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.

From-SVN: r66997
This commit is contained in:
Michael Koch 2003-05-20 11:53:11 +00:00 committed by Michael Koch
parent 8d4d9d1911
commit 669e91abfa
3 changed files with 22 additions and 6 deletions

View file

@ -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;
}
/**