aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormkoch <mkoch@138bc75d-0d04-0410-961f-82ee72b054a4>2003-05-20 11:53:11 +0000
committermkoch <mkoch@138bc75d-0d04-0410-961f-82ee72b054a4>2003-05-20 11:53:11 +0000
commit70b62d5f91a7a7cb2a7bf1392f0b96697112df06 (patch)
tree9277c22b9002ea46879f07db5568e49fc367dec4
parente43a8b47cd2db00f552fc252be30790cefa53121 (diff)
2003-05-20 Michael Koch <konqueror@gmx.de>
* java/io/DataInputStream.java (convertFromUTF): Merged comment from classpath. * java/io/PrintStream.java (error_occured): Renamed from error, merged comment from classpath. (PrintStream): No need to initialized error. (checkError): Replace error with error_occurred. (setError): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@66997 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--libjava/ChangeLog10
-rw-r--r--libjava/java/io/DataInputStream.java4
-rw-r--r--libjava/java/io/PrintStream.java14
3 files changed, 22 insertions, 6 deletions
diff --git a/libjava/ChangeLog b/libjava/ChangeLog
index 2afae0516d6..505e9c7291d 100644
--- a/libjava/ChangeLog
+++ b/libjava/ChangeLog
@@ -1,5 +1,15 @@
2003-05-20 Michael Koch <konqueror@gmx.de>
+ * java/io/DataInputStream.java
+ (convertFromUTF): Merged comment from classpath.
+ * java/io/PrintStream.java
+ (error_occured): Renamed from error, merged comment from classpath.
+ (PrintStream): No need to initialized error.
+ (checkError): Replace error with error_occurred.
+ (setError): Likewise.
+
+2003-05-20 Michael Koch <konqueror@gmx.de>
+
* java/io/DataInputStream.java:
Reformatted, Replaced < and & with html entitites in documentation.
* java/io/File.java:
diff --git a/libjava/java/io/DataInputStream.java b/libjava/java/io/DataInputStream.java
index 07c3b4ce0d2..6b4b1d74ead 100644
--- a/libjava/java/io/DataInputStream.java
+++ b/libjava/java/io/DataInputStream.java
@@ -755,6 +755,10 @@ public class DataInputStream extends FilterInputStream implements DataInput
((long)(buf [7] & 0xff)));
}
+ // FIXME: This method should be re-thought. I suspect we have multiple
+ // UTF-8 decoders floating around. We should use the standard charset
+ // converters, maybe and adding a direct call into one of the new
+ // NIO converters for a super-fast UTF8 decode.
static String convertFromUTF (byte[] buf)
throws EOFException, UTFDataFormatException
{
diff --git a/libjava/java/io/PrintStream.java b/libjava/java/io/PrintStream.java
index 418d7f2cbd5..418eea178cd 100644
--- a/libjava/java/io/PrintStream.java
+++ b/libjava/java/io/PrintStream.java
@@ -81,9 +81,12 @@ public class PrintStream extends FilterOutputStream
// Work buffer of bytes where we temporarily keep converter output.
byte[] work_bytes = new byte[100];
- // True if error occurred.
- private boolean error;
- // True if auto-flush.
+ /**
+ * This boolean indicates whether or not an error has ever occurred
+ * on this stream.
+ */
+ private boolean error_occurred = false;
+
/**
* This is <code>true</code> if auto-flush is enabled,
* <code>false</code> otherwise
@@ -123,7 +126,6 @@ public class PrintStream extends FilterOutputStream
super(out);
converter = UnicodeToBytes.getDefaultEncoder();
- error = false;
this.auto_flush = auto_flush;
}
@@ -139,7 +141,7 @@ public class PrintStream extends FilterOutputStream
public boolean checkError ()
{
flush();
- return error;
+ return error_occurred;
}
/**
@@ -148,7 +150,7 @@ public class PrintStream extends FilterOutputStream
*/
protected void setError ()
{
- error = true;
+ error_occurred = true;
}
/**