summaryrefslogtreecommitdiff
path: root/java/io/PrintStream.java
diff options
context:
space:
mode:
Diffstat (limited to 'java/io/PrintStream.java')
-rw-r--r--java/io/PrintStream.java78
1 files changed, 39 insertions, 39 deletions
diff --git a/java/io/PrintStream.java b/java/io/PrintStream.java
index 9347ac397..eaab7c3d4 100644
--- a/java/io/PrintStream.java
+++ b/java/io/PrintStream.java
@@ -8,7 +8,7 @@ GNU Classpath is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
-
+
GNU Classpath is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
@@ -53,7 +53,7 @@ import gnu.classpath.SystemProperties;
* 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
+ * 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>
@@ -85,7 +85,7 @@ public class PrintStream extends FilterOutputStream implements Appendable
private boolean error_occurred = false;
/**
- * This is <code>true</code> if auto-flush is enabled,
+ * This is <code>true</code> if auto-flush is enabled,
* <code>false</code> otherwise
*/
private final boolean auto_flush;
@@ -173,13 +173,13 @@ public class PrintStream extends FilterOutputStream implements Appendable
* This method initializes a new <code>PrintStream</code> object to write
* to the specified output sink. This constructor also allows "auto-flush"
* functionality to be specified where the stream will be flushed after
- * every <code>print</code> or <code>println</code> call, when the
- * <code>write</code> methods with array arguments are called, or when a
+ * every <code>print</code> or <code>println</code> call, when the
+ * <code>write</code> methods with array arguments are called, or when a
* single new-line character is written.
* <p>
*
* @param out The <code>OutputStream</code> to write to.
- * @param auto_flush <code>true</code> to flush the stream after every
+ * @param auto_flush <code>true</code> to flush the stream after every
* line, <code>false</code> otherwise
*/
public PrintStream (OutputStream out, boolean auto_flush)
@@ -187,13 +187,13 @@ public class PrintStream extends FilterOutputStream implements Appendable
super (out);
String encoding;
try {
- encoding = SystemProperties.getProperty("file.encoding");
+ encoding = SystemProperties.getProperty("file.encoding");
} catch (SecurityException e){
- encoding = "ISO8859_1";
+ encoding = "ISO8859_1";
} catch (IllegalArgumentException e){
- encoding = "ISO8859_1";
+ encoding = "ISO8859_1";
} catch (NullPointerException e){
- encoding = "ISO8859_1";
+ encoding = "ISO8859_1";
}
this.encoding = encoding;
this.auto_flush = auto_flush;
@@ -203,13 +203,13 @@ public class PrintStream extends FilterOutputStream implements Appendable
* This method initializes a new <code>PrintStream</code> object to write
* to the specified output sink. This constructor also allows "auto-flush"
* functionality to be specified where the stream will be flushed after
- * every <code>print</code> or <code>println</code> call, when the
- * <code>write</code> methods with array arguments are called, or when a
+ * every <code>print</code> or <code>println</code> call, when the
+ * <code>write</code> methods with array arguments are called, or when a
* single new-line character is written.
* <p>
*
* @param out The <code>OutputStream</code> to write to.
- * @param auto_flush <code>true</code> to flush the stream after every
+ * @param auto_flush <code>true</code> to flush the stream after every
* line, <code>false</code> otherwise
* @param encoding The name of the character encoding to use for this
* object.
@@ -230,7 +230,7 @@ public class PrintStream extends FilterOutputStream implements Appendable
* <code>true</code> forever for this stream. Before checking for an
* error condition, this method flushes the stream.
*
- * @return <code>true</code> if an error has occurred,
+ * @return <code>true</code> if an error has occurred,
* <code>false</code> otherwise
*/
public boolean checkError ()
@@ -255,16 +255,16 @@ public class PrintStream extends FilterOutputStream implements Appendable
{
try
{
- flush();
- out.close();
+ flush();
+ out.close();
}
catch (InterruptedIOException iioe)
{
- Thread.currentThread().interrupt();
+ Thread.currentThread().interrupt();
}
catch (IOException e)
{
- setError ();
+ setError ();
}
}
@@ -276,15 +276,15 @@ public class PrintStream extends FilterOutputStream implements Appendable
{
try
{
- out.flush();
+ out.flush();
}
catch (InterruptedIOException iioe)
{
- Thread.currentThread().interrupt();
+ Thread.currentThread().interrupt();
}
catch (IOException e)
{
- setError ();
+ setError ();
}
}
@@ -293,39 +293,39 @@ public class PrintStream extends FilterOutputStream implements Appendable
try
{
writeChars(str, 0, str.length());
- if (println)
- writeChars(line_separator, 0, line_separator.length);
- if (auto_flush)
- flush();
+ if (println)
+ writeChars(line_separator, 0, line_separator.length);
+ if (auto_flush)
+ flush();
}
catch (InterruptedIOException iioe)
{
- Thread.currentThread().interrupt();
+ Thread.currentThread().interrupt();
}
catch (IOException e)
{
- setError ();
+ setError ();
}
}
private synchronized void print (char[] chars, int pos, int len,
- boolean println)
+ boolean println)
{
try
{
writeChars(chars, pos, len);
- if (println)
- writeChars(line_separator, 0, line_separator.length);
- if (auto_flush)
- flush();
+ if (println)
+ writeChars(line_separator, 0, line_separator.length);
+ if (auto_flush)
+ flush();
}
catch (InterruptedIOException iioe)
{
- Thread.currentThread().interrupt();
+ Thread.currentThread().interrupt();
}
catch (IOException e)
{
- setError ();
+ setError ();
}
}
@@ -577,7 +577,7 @@ public class PrintStream extends FilterOutputStream implements Appendable
* This method writes a byte of data to the stream. If auto-flush is
* enabled, printing a newline character will cause the stream to be
* flushed after the character is written.
- *
+ *
* @param oneByte The byte to be written
*/
public void write (int oneByte)
@@ -585,13 +585,13 @@ public class PrintStream extends FilterOutputStream implements Appendable
try
{
out.write (oneByte & 0xff);
-
+
if (auto_flush && (oneByte == '\n'))
flush ();
}
catch (InterruptedIOException iioe)
{
- Thread.currentThread ().interrupt ();
+ Thread.currentThread ().interrupt ();
}
catch (IOException e)
{
@@ -612,13 +612,13 @@ public class PrintStream extends FilterOutputStream implements Appendable
try
{
out.write (buffer, offset, len);
-
+
if (auto_flush)
flush ();
}
catch (InterruptedIOException iioe)
{
- Thread.currentThread ().interrupt ();
+ Thread.currentThread ().interrupt ();
}
catch (IOException e)
{