java.util.PropertyResourceBundle
java.util.ResourceBundle
None
None
New as of JDK 1.1
The PropertyResourceBundle class is a concrete subclass of ResourceBundle that represents a set of resources for a locale. The resources are specified as a set of key/value string pairs in a property file. Internally, a Properties object is used to retrieve the resources from the property file.
When ResourceBundle.getBundle() is called, it attempts to find a resource bundle that most closely matches a particular locale. This can be either a ListResourceBundle subclass or a property file, represented by a PropertyResourceBundle. Once the resource bundle has been retrieved, its contents can be used by the application to present locale-specific information.
PropertyResourceBundle inherits a lot of functionality from ResourceBundle; see the class description of ResourceBundle for more information.
public class java.util.PropertyResourceBundle extends java.util.ResourceBundle { // Constructors public PropertyResourceBundle(InputStream stream); // Instance Methods public Enumeration getKeys(); public Object handleGetObject(String key); }
public PropertyResourceBundle(InputStream stream) throws IOException
The input stream to use.
If any kind of I/O error occurs.
This constructor creates a PropertyResourceBundle that reads properties from the given input stream.
The keys in the resource bundle as an Enumeration.
ResourceBundle.getKeys()
This method returns an Enumeration that iterates through the keys in this PropertyResourceBundle.
The key of the resource to retrieve.
The resource that corresponds to this key.
ResourceBundle.handleGetObject()
This method returns the resource that corresponds to the given key.
Method |
Inherited From |
Method |
Inherited From |
---|---|---|---|
clone() |
Object |
equals(Object) |
Object |
finalize() |
Object |
getClass() |
Object |
getObject(String) |
ResourceBundle |
getString(String) |
ResourceBundle |
getStringArray(String) |
ResourceBundle |
hashCode() |
Object |
notify() |
Object |
notifyAll() |
Object |
setParent(ResourceBundle) |
ResourceBundle |
toString() |
Object |
wait() |
Object |
wait(long) |
Object |
wait(long, int) |
Object |
Enumeration, IOException, ListResourceBundle, Properties, ResourceBundle