|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface IResource
An IResource object represents a resource such as text or a www resource that can be used in your application.
| Method Summary | |
|---|---|
byte[] |
getBytes()
Gets the content of the resource as a byte array. |
String |
getId()
Gets the id of the resource. |
String |
getKey()
Gets the key of the resource. |
Locale |
getLocale()
Gets the locale that this resource is associated with. |
String |
getMimetype()
Gets the mimetype of the resource. |
String |
getNamespace()
Gets the namespace that the resource is part of. |
String |
getText()
Gets the content of the resource as a text string. |
String |
getText(Charset encoding)
Gets the content of the resource as a text string. |
| Method Detail |
|---|
String getNamespace()
String getId()
String getKey()
This is a combination of namespace and id. For example: namespace=com.caltiha, id=msg, key=com.calitha.msg If the namespace is null, then the key is the same as the id.
Locale getLocale()
Each resource is associated with a particular locale. However both the language and country can be empty mean it can be used for all languages and countries.
String getMimetype()
byte[] getBytes()
String getText()
String getText(Charset encoding)
throws UnsupportedEncodingException
Useful if the encoding is not part of the resource. For example a file that contains a text string.
encoding - character set such as UTF-8 or ISO-8859-1
UnsupportedEncodingException - thrown if the Character Encoding is not supported.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||