|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--javax.microedition.global.ResourceManager
| Field Summary | ||
static String |
DEVICE
Constant to indicate device resources. |
|
| Method Summary | ||
String |
getBaseName()
Gets the base name of this resource manager. |
|
byte[] |
getData(int id)
Gets a resource with the specified resource ID as a byte array containing arbitrary binary data. |
|
String |
getLocale()
Gets the locale of this resource manager. |
|
static ResourceManager |
getManager(String baseName)
Gets a resource manager for the specified base name and the system's default locale. |
|
static ResourceManager |
getManager(String baseName,
String locale)
Gets a resource manager for the specified base name and locale. |
|
static ResourceManager |
getManager(String baseName,
String[] locales)
Gets a resource manager for the specified base name and the first matching locale in the supplied array. |
|
Object |
getResource(int id)
Gets a resource with the specified ID. |
|
String |
getString(int id)
Gets a string with the specified resource ID. |
|
static String[] |
getSupportedLocales(String baseName)
Gets the locales supported by this resource manager for the given base name. |
|
boolean |
isCaching()
Returns the caching status of this resource manager. |
|
boolean |
isValidResourceID(int id)
Determines if the given resource ID is valid in this implementation. |
|
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
| Method Detail |
public String getBaseName()
public byte[] getData(int id)
throws ResourceException
id - the resource IDResourceException - if the resource does not exist, or if the resource is not the correct typeIllegalArgumentException - if the resource ID is invalidpublic String getLocale()
public static final ResourceManager getManager(String baseName) throws ResourceException, UnsupportedLocaleException
baseName - the base name, DEVICE to retrieve device-specific resourcesNullPointerException - if the base name is nullResourceException - if the system default locale is null, or the resource file is invalidUnsupportedLocaleException - if the system's default locale (when non-null) is not listed in the meta-information file of this base name (for application resources only), or when device resources are not supported for the system's default localepublic static final ResourceManager getManager(String baseName, String locale) throws ResourceException, UnsupportedLocaleException
baseName - the base name, non-empty for application resources, DEVICE (the empty string) for device resourceslocale - the locale to use either as is or as a starting point for hierarchical matchingNullPointerException - if the base name is null or if the locale is nullIllegalArgumentException - if the locale identifier is not valid according to the MIDP 2.0 specificationResourceException - if no resources for the combination of base name and locale are found, or the resource file is invalidUnsupportedLocaleException - if locale is not listed in the meta-information file of this base name (application resources only)public static final ResourceManager getManager(String baseName, String[] locales) throws ResourceException, UnsupportedLocaleException
baseName - the base name, non-empty for application resources, or DEVICE (the empty string) for device resourceslocales - the array of locale identifiers to tryNullPointerException - if the locales array is null, or if any of the locales in the array is null, or the base name is nullIllegalArgumentException - if any of the locale identifiers in the array is invalid according to the MIDP 2.0 specification, or if the array is emptyResourceException - if no resources for the base name and any of the locales in the array are foundUnsupportedLocaleException - if none of the locales in the array are listed in the meta-information file of this base name (for application resources), or when device resources are not supported for any of the localespublic Object getResource(int id) throws ResourceException
id - the resource IDResourceException - if the resource is not found, or if an application resource has an unknown typeIllegalArgumentException - if the resource ID is invalidpublic String getString(int id) throws ResourceException
id - the resource IDResourceException - if the resource is not found, or if an application resource has an unknown typeIllegalArgumentException - if the resource ID is invalidpublic static String[] getSupportedLocales(String baseName)
baseName - the base name, non-empty for application resources, DEVICE (the empty string) for device resourcesNullPointerException - if the base name is nullResourceException - if the meta-information file is not found or it is not of the specified formatpublic boolean isCaching()
public boolean isValidResourceID(int id)
id - the resource IDIllegalArgumentException - if the resource ID is not in the defined range
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
Copyright 1999-2008 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.
Copyright 1993-2003 Sun Microsystems, Inc. 901 San Antonio Road, Palo Alto, California, 94303, U.S.A.
Copyright 2002-2003 Nokia Corporation All Rights Reserved.
Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.