public class ExtendedPrintWriter
extends java.io.PrintWriter
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
autoFlush_
True, if autoflush is on.
|
static char[] |
CR
Constant for "\r".
|
static char[] |
CRLF
Constant for "\r\n".
|
static char[] |
LF
Constant for "\n".
|
protected char[] |
newLine_
The newline to be used for linefeed.
|
protected java.io.Writer |
out_
The underlying writer.
|
| Constructor and Description |
|---|
ExtendedPrintWriter(java.io.Writer out,
boolean autoFlush,
char[] newLine)
Create a new ExtendedPrintWriter.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close the stream.
|
boolean |
getAutoFlush()
Check if auto flushing is active for
println() methods. |
char[] |
getNewLine()
Get the current linefeed character(s) that are used by
the
println() methods. |
protected void |
newLine()
Print a line feed and use the newline character of this writer.
|
void |
println()
Finish the line.
|
void |
println(boolean x)
Print a boolean, and then finish the line.
|
void |
println(char x)
Print a character, and then finish the line.
|
void |
println(char[] x)
Print an array of characters, and then finish the line.
|
void |
println(double x)
Print a double, and then finish the line.
|
void |
println(float x)
Print a float, and then finish the line.
|
void |
println(int x)
Print an integer, and then finish the line.
|
void |
println(long x)
Print a long, and then finish the line.
|
void |
println(java.lang.Object x)
Print an Object, and then finish the line.
|
void |
println(java.lang.String x)
Print a String, and then finish the line.
|
void |
setAutoFlush(boolean autoFlush)
Enable or disable auto flushing for
println() methods. |
char[] |
setNewLine(char[] newLine)
Set the newline character(s) to use for linefeed by the
println() methods. |
public static final char[] CRLF
public static final char[] CR
public static final char[] LF
protected java.io.Writer out_
protected boolean autoFlush_
protected char[] newLine_
public ExtendedPrintWriter(java.io.Writer out,
boolean autoFlush,
char[] newLine)
out - An output writer.autoFlush - A boolean; if true,
the println() methods will flush the
output buffer.protected void newLine()
public void println()
println in class java.io.PrintWriterpublic void println(boolean x)
println in class java.io.PrintWriterpublic void println(char x)
println in class java.io.PrintWriterpublic void println(int x)
println in class java.io.PrintWriterpublic void println(long x)
println in class java.io.PrintWriterpublic void println(float x)
println in class java.io.PrintWriterpublic void println(double x)
println in class java.io.PrintWriterpublic void println(char[] x)
println in class java.io.PrintWriterpublic void println(java.lang.String x)
println in class java.io.PrintWriterpublic void println(java.lang.Object x)
println in class java.io.PrintWriterpublic char[] setNewLine(char[] newLine)
println() methods.newLine - The new linefeed character(s)
(the newLine char array is not cloned
or copied by this method).public char[] getNewLine()
println() methods.public boolean getAutoFlush()
println() methods.public void setAutoFlush(boolean autoFlush)
println() methods.autoFlush - True, to enable auto flushing.public void close()
close in interface java.io.Closeableclose in interface java.lang.AutoCloseableclose in class java.io.PrintWriter