java.util
Class PropertyResourceBundle
java.lang.Object
java.util.ResourceBundle
java.util.PropertyResourceBundle
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.
- Since:
- 1.1
- See Also:
ResourceBundle,
Properties
|
Constructor Summary |
PropertyResourceBundle(InputStream stream)
Constructs a new instance of PropertyResourceBundle and loads the
properties file from the specified input stream. |
|
Method Summary |
Enumeration<String> |
getKeys()
Returns the names of the resources contained in this
PropertyResourceBundle. |
Object |
handleGetObject(String key)
Returns the named resource from this PropertyResourceBundle, or null if
the resource is not found. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
resources
Properties resources
PropertyResourceBundle
public PropertyResourceBundle(InputStream stream)
throws IOException
- Constructs a new instance of PropertyResourceBundle and loads the
properties file from the specified input stream.
- Parameters:
stream - the input stream
- Throws:
IOException
getKeys
public Enumeration<String> getKeys()
- Returns the names of the resources contained in this
PropertyResourceBundle.
- Specified by:
getKeys in class ResourceBundle
- Returns:
- an Enumeration of the resource names
handleGetObject
public Object handleGetObject(String key)
- Returns the named resource from this PropertyResourceBundle, or null if
the resource is not found.
- Specified by:
handleGetObject in class ResourceBundle
- Parameters:
key - the name of the resource
- Returns:
- the resource object
Please submit a feedback, bug or feature