diff options
author | Michael Koch <konqueror@gmx.de> | 2003-03-28 13:07:46 +0000 |
---|---|---|
committer | Michael Koch <mkoch@gcc.gnu.org> | 2003-03-28 13:07:46 +0000 |
commit | 01312d1259c2c0f587a0bec04187721c2ae60c65 (patch) | |
tree | bef34f4b573bf6125d7f8d8f5c575c2d3c552a4a /libjava/java/io/PrintStream.java | |
parent | bcfaead06e1abd3796619d853aee8ae762976e15 (diff) | |
download | gcc-01312d1259c2c0f587a0bec04187721c2ae60c65.zip gcc-01312d1259c2c0f587a0bec04187721c2ae60c65.tar.gz gcc-01312d1259c2c0f587a0bec04187721c2ae60c65.tar.bz2 |
File.java: Import needed classes instead of whole packages...
2003-03-28 Michael Koch <konqueror@gmx.de>
* java/io/File.java:
Import needed classes instead of whole packages, merged class
documentation with classpath, moved constants and variables to top of
class.
* java/io/PrintStream.java:
Merged class documentation with classpath, moved constants and
variables to top of class.
* java/io/RandomAccessFile.java
(RandomAccessFile): Merged with classpath.
(read): Merged with classpath).
(read*): Reformatted.
From-SVN: r64974
Diffstat (limited to 'libjava/java/io/PrintStream.java')
-rw-r--r-- | libjava/java/io/PrintStream.java | 56 |
1 files changed, 36 insertions, 20 deletions
diff --git a/libjava/java/io/PrintStream.java b/libjava/java/io/PrintStream.java index 8fc1cb8..9563305 100644 --- a/libjava/java/io/PrintStream.java +++ b/libjava/java/io/PrintStream.java @@ -37,24 +37,55 @@ exception statement from your version. */ package java.io; -import gnu.gcj.convert.UnicodeToBytes; -/** - * @author Tom Tromey <tromey@cygnus.com> - * @date September 24, 1998 - */ +import gnu.gcj.convert.UnicodeToBytes; /* Written using "Java Class Libraries", 2nd edition, ISBN 0-201-31002-3 * "The Java Language Specification", ISBN 0-201-63451-1 * Status: Believed complete and correct to 1.3 */ +/** + * This class prints Java primitive values and object to a stream as + * text. None of the methods in this class throw an exception. However, + * errors can be detected by calling the <code>checkError()</code> method. + * Additionally, this stream can be designated as "autoflush" when + * created so that any writes are automatically flushed to the underlying + * output sink when the current line is terminated. + * <p> + * <b>Note that this class is deprecated</b>. It exists for backward + * compatibility only. New code should be written to use + * <code>PrintWriter</code> instead. + * <p> + * This class converts char's into byte's using the system default encoding. + * + * @deprecated + * + * @author Aaron M. Renn <arenn@urbanophile.com> + * @author Tom Tromey <tromey@cygnus.com> + */ public class PrintStream extends FilterOutputStream { /* Notice the implementation is quite similar to OutputStreamWriter. * This leads to some minor duplication, because neither inherits * from the other, and we want to maximize performance. */ + // Line separator string. + private static final char[] line_separator + = System.getProperty("line.separator").toCharArray(); + + UnicodeToBytes converter; + + // Work buffer of characters for converter. + char[] work = new char[100]; + // 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. + private boolean auto_flush; + public PrintStream (OutputStream out) { this(out, false); @@ -312,19 +343,4 @@ public class PrintStream extends FilterOutputStream } } - UnicodeToBytes converter; - - // Work buffer of characters for converter. - char[] work = new char[100]; - // 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. - private boolean auto_flush; - - // Line separator string. - private static final char[] line_separator - = System.getProperty("line.separator").toCharArray(); } |