diff options
Diffstat (limited to 'libjava/classpath/java/util/PropertyResourceBundle.java')
-rw-r--r-- | libjava/classpath/java/util/PropertyResourceBundle.java | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/libjava/classpath/java/util/PropertyResourceBundle.java b/libjava/classpath/java/util/PropertyResourceBundle.java index 53a1af5360b..b528f08ca85 100644 --- a/libjava/classpath/java/util/PropertyResourceBundle.java +++ b/libjava/classpath/java/util/PropertyResourceBundle.java @@ -40,6 +40,7 @@ package java.util; import java.io.IOException; import java.io.InputStream; +import java.io.Reader; /** * This class is a concrete <code>ResourceBundle</code> that gets it @@ -97,7 +98,8 @@ public class PropertyResourceBundle extends ResourceBundle private Properties properties; /** - * Creates a new property resource bundle. + * Creates a new property resource bundle. The property file must + * be encoded using ISO-8859-1. * * @param stream an input stream, where the resources are read from * @throws NullPointerException if stream is null @@ -110,6 +112,21 @@ public class PropertyResourceBundle extends ResourceBundle } /** + * Creates a new property resource bundle. The encoding of the property + * file is determined by the supplied {@link Reader} object. + * + * @param reader an input stream, where the resources are read from + * @throws NullPointerException if stream is null + * @throws IOException if reading the stream fails + * @since 1.6 + */ + public PropertyResourceBundle(Reader reader) throws IOException + { + properties = new Properties(); + properties.load(reader); + } + + /** * Called by <code>getObject</code> when a resource is needed. This * returns the resource given by the key. * |