public class PropertyResourceBundle extends ResourceBundle
PropertyResourceBundle loads resources from an InputStream. All resources are
Strings. The resources must be of the form key=value, one
resource per line (see Properties).ResourceBundle,
PropertiesResourceBundle.Controlparent| Constructor and Description |
|---|
PropertyResourceBundle(InputStream stream)
Constructs a new instance of
PropertyResourceBundle and loads the
properties file from the specified InputStream. |
PropertyResourceBundle(Reader reader)
Constructs a new resource bundle with properties read from
reader. |
| Modifier and Type | Method and Description |
|---|---|
Enumeration<String> |
getKeys()
Returns the names of the resources contained in this
ResourceBundle. |
Object |
handleGetObject(String key)
Returns the named resource from this
ResourceBundle, or null if the
resource is not found. |
protected Set<String> |
handleKeySet() |
clearCache, clearCache, containsKey, getBundle, getBundle, getBundle, getBundle, getBundle, getBundle, getLocale, getObject, getString, getStringArray, keySet, setParentpublic PropertyResourceBundle(InputStream stream) throws IOException
PropertyResourceBundle and loads the
properties file from the specified InputStream.stream - the InputStream.IOException - if an error occurs during a read operation on the
InputStream.public PropertyResourceBundle(Reader reader) throws IOException
reader.reader - the ReaderIOExceptionprotected Set<String> handleKeySet()
handleKeySet in class ResourceBundlepublic Enumeration<String> getKeys()
ResourceBundleResourceBundle.getKeys in class ResourceBundleEnumeration of the resource names.public Object handleGetObject(String key)
ResourceBundleResourceBundle, or null if the
resource is not found.handleGetObject in class ResourceBundlekey - the name of the resource.