public class WriterPrintStream extends PrintStream implements OutputStreaming
out| Constructor and Description |
|---|
WriterPrintStream(PrintWriter out) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
checkError()
Flush the stream and check its error state.
|
void |
close()
Close the stream.
|
void |
flush()
Flush the stream.
|
void |
print(boolean f)
Print a boolean value.
|
void |
print(char ch)
Print a character.
|
void |
print(char[] ach)
Print an array of characters.
|
void |
print(double dfl)
Print a double-precision floating-point number.
|
void |
print(float fl)
Print a floating-point number.
|
void |
print(int i)
Print an integer.
|
void |
print(long l)
Print a long integer.
|
void |
print(Object o)
Print an object.
|
void |
print(String s)
Print a string.
|
void |
println()
Terminate the current line by writing the line separator string.
|
void |
println(boolean f)
Print a boolean and then terminate the line.
|
void |
println(char ch)
Print a character and then terminate the line.
|
void |
println(char[] ach)
Print an array of characters and then terminate the line.
|
void |
println(double dfl)
Print a double and then terminate the line.
|
void |
println(float fl)
Print a float and then terminate the line.
|
void |
println(int i)
Print an integer and then terminate the line.
|
void |
println(long l)
Print a long and then terminate the line.
|
void |
println(Object o)
Print an Object and then terminate the line.
|
void |
println(String s)
Print a String and then terminate the line.
|
protected void |
setError()
Set the error state of the stream to
true. |
void |
write(byte[] ab,
int of,
int cb)
Write
len bytes from the specified byte array starting at
offset off to this stream. |
void |
write(int b)
Write the specified byte to this stream.
|
append, append, append, clearError, format, format, printf, printfwritepublic WriterPrintStream(PrintWriter out)
public void flush()
flush in interface com.oracle.coherence.common.io.OutputStreamingflush in interface Flushableflush in class PrintStreamOutputStream.flush()public void close()
close in interface com.oracle.coherence.common.io.OutputStreamingclose in interface Closeableclose in interface AutoCloseableclose in class PrintStreamOutputStream.close()public boolean checkError()
true when the underlying output stream throws an
IOException other than InterruptedIOException,
and when the setError method is invoked. If an operation
on the underlying output stream throws an
InterruptedIOException, then the PrintStream
converts the exception back into an interrupt by doing:
Thread.currentThread().interrupt();
or the equivalent.checkError in class PrintStreamIOException other than
InterruptedIOException, or the
setError method has been invokedprotected void setError()
true.setError in class PrintStreampublic void write(int b)
flush method will be
invoked.
Note that the byte is written as given; to write a character that
will be translated according to the platform's default character
encoding, use the print(char) or println(char)
methods.
write in interface com.oracle.coherence.common.io.OutputStreamingwrite in class PrintStreamb - The byte to be writtenprint(char),
println(char)public void write(byte[] ab,
int of,
int cb)
len bytes from the specified byte array starting at
offset off to this stream. If automatic flushing is
enabled then the flush method will be invoked.
Note that the bytes will be written as given; to write characters
that will be translated according to the platform's default character
encoding, use the print(char) or println(char)
methods.
write in interface com.oracle.coherence.common.io.OutputStreamingwrite in class PrintStreamab - A byte arrayof - Offset from which to start taking bytescb - Number of bytes to writepublic void print(boolean f)
String.valueOf(boolean) is translated into bytes
according to the platform's default character encoding, and these bytes
are written in exactly the manner of the
write(int) method.print in class PrintStreamf - The boolean to be printedpublic void print(char ch)
write(int) method.print in class PrintStreamch - The char to be printedpublic void print(int i)
String.valueOf(int) is translated into bytes
according to the platform's default character encoding, and these bytes
are written in exactly the manner of the
write(int) method.print in class PrintStreami - The int to be printedInteger.toString(int)public void print(long l)
String.valueOf(long) is translated into bytes
according to the platform's default character encoding, and these bytes
are written in exactly the manner of the
write(int) method.print in class PrintStreaml - The long to be printedLong.toString(long)public void print(float fl)
String.valueOf(float) is translated into bytes
according to the platform's default character encoding, and these bytes
are written in exactly the manner of the
write(int) method.print in class PrintStreamfl - The float to be printedFloat.toString(float)public void print(double dfl)
String.valueOf(double) is translated into
bytes according to the platform's default character encoding, and these
bytes are written in exactly the manner of the write(int) method.print in class PrintStreamdfl - The double to be printedDouble.toString(double)public void print(char[] ach)
write(int) method.print in class PrintStreamach - The array of chars to be printedNullPointerException - If s is nullpublic void print(String s)
null then the string
"null" is printed. Otherwise, the string's characters are
converted into bytes according to the platform's default character
encoding, and these bytes are written in exactly the manner of the
write(int) method.print in class PrintStreams - The String to be printedpublic void print(Object o)
String.valueOf(Object) method is translated into bytes
according to the platform's default character encoding, and these bytes
are written in exactly the manner of the
write(int) method.print in class PrintStreamo - The Object to be printedObject.toString()public void println()
line.separator, and is not necessarily a single newline
character ('\n').println in class PrintStreampublic void println(boolean f)
print(boolean) and then
println().println in class PrintStreamf - The boolean to be printedpublic void println(char ch)
print(char) and then
println().println in class PrintStreamch - The char to be printed.public void println(int i)
print(int) and then
println().println in class PrintStreami - The int to be printed.public void println(long l)
print(long) and then
println().println in class PrintStreaml - a The long to be printed.public void println(float fl)
print(float) and then
println().println in class PrintStreamfl - The float to be printed.public void println(double dfl)
print(double) and then
println().println in class PrintStreamdfl - The double to be printed.public void println(char[] ach)
print(char[]) and
then println().println in class PrintStreamach - an array of chars to print.public void println(String s)
print(String) and then
println().println in class PrintStreams - The String to be printed.public void println(Object o)
print(Object) and then
println().println in class PrintStreamo - The Object to be printed.