summaryrefslogtreecommitdiffstats
path: root/libjava/java/util
diff options
context:
space:
mode:
authorgreen <green@138bc75d-0d04-0410-961f-82ee72b054a4>1999-05-08 22:21:50 +0000
committergreen <green@138bc75d-0d04-0410-961f-82ee72b054a4>1999-05-08 22:21:50 +0000
commitb4fe8cc4464910a7eac139ebd8c48e4d2bf40c00 (patch)
tree9c426e950b4514145123e218f2d88bb529e7d72f /libjava/java/util
parent0f59ea7de362473929d531e73a3f42c5868fe674 (diff)
downloadppe42-gcc-b4fe8cc4464910a7eac139ebd8c48e4d2bf40c00.tar.gz
ppe42-gcc-b4fe8cc4464910a7eac139ebd8c48e4d2bf40c00.zip
* java/text/DateFormat.java (computeInstance): Separate time
and date styles. (getDateTimeInstance): Ditto. (getDateTimeInstance(int,int)): New method. * Makefile.in: Rebuilt. * Makefile.am (ordinary_java_source_files): Add new classes. * java/util/PropertyResourceBundle.java: New file. * gnu/gcj/util/EnumerationChain.java: New file. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@26842 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava/java/util')
-rw-r--r--libjava/java/util/PropertyResourceBundle.java47
1 files changed, 47 insertions, 0 deletions
diff --git a/libjava/java/util/PropertyResourceBundle.java b/libjava/java/util/PropertyResourceBundle.java
new file mode 100644
index 00000000000..706e4279443
--- /dev/null
+++ b/libjava/java/util/PropertyResourceBundle.java
@@ -0,0 +1,47 @@
+/* Copyright (C) 1999 Cygnus Solutions
+
+ This file is part of libgcj.
+
+This software is copyrighted work licensed under the terms of the
+Libgcj License. Please consult the file "LIBGCJ_LICENSE" for
+details. */
+
+package java.util;
+
+import java.io.InputStream;
+import java.io.IOException;
+import gnu.gcj.util.EnumerationChain;
+
+/**
+ * @author Anthony Green <green@cygnus.com>
+ * @date April 29, 1999.
+ */
+
+/* Written using "Java Class Libraries", 2nd edition, ISBN 0-201-31002-3,
+ * and "The Java Language Specification", ISBN 0-201-63451-1. */
+
+public class PropertyResourceBundle extends ResourceBundle
+{
+ private Properties properties;
+
+ public PropertyResourceBundle (InputStream pstream) throws IOException
+ {
+ // Initialize and load our Properties.
+ properties = new Properties();
+ properties.load(pstream);
+ }
+
+ public Enumeration getKeys()
+ {
+ if (parent == null)
+ return properties.propertyNames();
+ else
+ return new EnumerationChain (properties.propertyNames(),
+ parent.getKeys ());
+ }
+
+ protected Object handleGetObject (String key)
+ {
+ return properties.getProperty(key);
+ }
+}
OpenPOWER on IntegriCloud