|
Build 1.0_r1(from source) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.util.ResourceBundle
public abstract class ResourceBundle
ResourceBundle is an abstract class which is the superclass of classes which provide locale specific resources. A bundle contains a number of named resources, where the names are Strings. A bundle may have a parent bundle, when a resource is not found in a bundle, the parent bundle is searched for the resource.
Properties,
PropertyResourceBundle| Nested Class Summary | |
|---|---|
(package private) static class |
ResourceBundle.MissingBundle
|
| Field Summary | |
|---|---|
protected ResourceBundle |
parent
The parent of this ResourceBundle. |
| Constructor Summary | |
|---|---|
ResourceBundle()
Constructs a new instance of this class. |
|
| Method Summary | |
|---|---|
static ResourceBundle |
getBundle(String bundleName)
Finds the named resource bundle for the default locale. |
static ResourceBundle |
getBundle(String bundleName,
Locale locale)
Finds the named resource bundle for the specified locale. |
static ResourceBundle |
getBundle(String bundleName,
Locale locale,
ClassLoader loader)
Finds the named resource bundle for the specified locale. |
abstract Enumeration<String> |
getKeys()
Returns the names of the resources contained in this ResourceBundle. |
Locale |
getLocale()
Gets the Locale of this ResourceBundle. |
Object |
getObject(String key)
Returns the named resource from this ResourceBundle. |
String |
getString(String key)
Returns the named resource from this ResourceBundle. |
String[] |
getStringArray(String key)
Returns the named resource from this ResourceBundle. |
protected abstract Object |
handleGetObject(String key)
Returns the named resource from this ResourceBundle, or null if the resource is not found. |
protected void |
setParent(ResourceBundle bundle)
Sets the parent resource bundle of this ResourceBundle. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected ResourceBundle parent
| Constructor Detail |
|---|
public ResourceBundle()
| Method Detail |
|---|
public static final ResourceBundle getBundle(String bundleName)
throws MissingResourceException
bundleName - the name of the resource bundle
MissingResourceException - when the resource bundle cannot be found
public static final ResourceBundle getBundle(String bundleName,
Locale locale)
bundleName - the name of the resource bundlelocale - the locale
MissingResourceException - when the resource bundle cannot be found
public static ResourceBundle getBundle(String bundleName,
Locale locale,
ClassLoader loader)
throws MissingResourceException
bundleName - the name of the resource bundlelocale - the localeloader - the ClassLoader to use
MissingResourceException - when the resource bundle cannot be foundpublic abstract Enumeration<String> getKeys()
public Locale getLocale()
public final Object getObject(String key)
key - the name of the resource
MissingResourceException - when the resource is not foundpublic final String getString(String key)
key - the name of the resource
MissingResourceException - when the resource is not foundpublic final String[] getStringArray(String key)
key - the name of the resource
MissingResourceException - when the resource is not foundprotected abstract Object handleGetObject(String key)
key - the name of the resource
protected void setParent(ResourceBundle bundle)
bundle - the parent resource bundle
|
Build 1.0_r1(from source) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||