diff options
author | tromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-09-06 17:16:09 +0000 |
---|---|---|
committer | tromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-09-06 17:16:09 +0000 |
commit | cc812436bb9b2d26862824ac8f8b896dfe73eee3 (patch) | |
tree | bb66194dd86aa561e71fe9369f416ca5b1369f8a /libjava/java/util | |
parent | f643a7d5eab84f0bed2429b3770e336a42680381 (diff) | |
download | ppe42-gcc-cc812436bb9b2d26862824ac8f8b896dfe73eee3.tar.gz ppe42-gcc-cc812436bb9b2d26862824ac8f8b896dfe73eee3.zip |
* java/util/Properties.java: Re-merged from Classpath.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@45442 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava/java/util')
-rw-r--r-- | libjava/java/util/Properties.java | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/libjava/java/util/Properties.java b/libjava/java/util/Properties.java index dc679faf126..5812173c91f 100644 --- a/libjava/java/util/Properties.java +++ b/libjava/java/util/Properties.java @@ -1,5 +1,5 @@ /* java.util.Properties - Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc. + Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -61,7 +61,8 @@ import java.io.*; * of <code>get/put</code>. * * @see PropertyResourceBundle - * @author Jochen Hoenicke */ + * @author Jochen Hoenicke + */ public class Properties extends Hashtable { /** @@ -128,8 +129,9 @@ public class Properties extends Hashtable * from the input. */ public void load(InputStream inStream) throws IOException { + // The spec says that the file must be encoded using ISO-8859-1. BufferedReader reader = - new BufferedReader(new InputStreamReader(inStream)); + new BufferedReader(new InputStreamReader(inStream, "ISO-8859-1")); String line; while ((line = reader.readLine()) != null) @@ -302,7 +304,9 @@ public class Properties extends Hashtable */ public void store(OutputStream out, String header) throws IOException { - PrintWriter writer = new PrintWriter(out); + // The spec says that the file must be encoded using ISO-8859-1. + PrintWriter writer + = new PrintWriter(new OutputStreamWriter (out, "ISO-8859-1")); if (header != null) writer.println("#" + header); writer.println("#" + new Date().toString()); |