mirror of
git://gcc.gnu.org/git/gcc.git
synced 2024-12-25 09:29:04 +08:00
05dfd09c0c
* java/net/DatagramSocketImpl.java (localPort): Fixed typo to match JDK. * java/net/natPlainDatagramSocketImpl.cc (bind): ditto. * java/text/ChoiceFormat.java (nextDouble(double, boolean)): Method is not final per JDK. * java/util/PropertyResourceBundle.java (handleGetObject): Method is public per JDK. * java/util/zip/DataFormatException.java: Class extends Exception. * java/util/zip/Deflater.java (finalize): Method is protected per JDK. * java/util/zip/ZipEntry.java: Class implements ZipConstants. * java/util/zip/ZipInputStream.java: ditto. (closeEntry): Changed method name to match JDK spec. From-SVN: r27717
48 lines
1.2 KiB
Java
48 lines
1.2 KiB
Java
/* 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 ());
|
|
}
|
|
|
|
public Object handleGetObject (String key)
|
|
{
|
|
return properties.getProperty(key);
|
|
}
|
|
}
|