|
CoherenceTM v3.3 Copyright© 2000-2007 by Oracle Corporation |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.io.OutputStream
java.io.FilterOutputStream
java.io.PrintStream
com.tangosol.io.WriterPrintStream
public class WriterPrintStream
Overrides PrintStream to delegate to a PrintWriter.
Field Summary |
---|
Fields inherited from class java.io.FilterOutputStream |
---|
out |
Constructor Summary | |
---|---|
WriterPrintStream(PrintWriter out)
|
Method Summary | |
---|---|
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. |
Methods inherited from class java.io.PrintStream |
---|
append, append, append, append, append, append, format, format, printf, printf |
Methods inherited from class java.io.FilterOutputStream |
---|
write |
Methods inherited from interface com.tangosol.io.OutputStreaming |
---|
write |
Constructor Detail |
---|
public WriterPrintStream(PrintWriter out)
Method Detail |
---|
public void flush()
flush
in interface OutputStreaming
flush
in interface Flushable
flush
in class PrintStream
OutputStream.flush()
public void close()
close
in interface OutputStreaming
close
in interface Closeable
close
in class PrintStream
OutputStream.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 PrintStream
IOException
other than
InterruptedIOException
, or the
setError
method has been invokedprotected void setError()
true
.
setError
in class PrintStream
public 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 OutputStreaming
write
in class PrintStream
b
- 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 OutputStreaming
write
in class PrintStream
ab
- 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 PrintStream
f
- The boolean
to be printedpublic void print(char ch)
write(int)
method.
print
in class PrintStream
ch
- 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 PrintStream
i
- 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 PrintStream
l
- 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 PrintStream
fl
- 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 PrintStream
dfl
- The double
to be printedDouble.toString(double)
public void print(char[] ach)
write(int)
method.
print
in class PrintStream
ach
- The array of chars to be printed
NullPointerException
- If s
is null
public 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 PrintStream
s
- 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 PrintStream
o
- The Object
to be printedObject.toString()
public void println()
line.separator
, and is not necessarily a single newline
character ('\n'
).
println
in class PrintStream
public void println(boolean f)
print(boolean)
and then
println()
.
println
in class PrintStream
f
- The boolean
to be printedpublic void println(char ch)
print(char)
and then
println()
.
println
in class PrintStream
ch
- The char
to be printed.public void println(int i)
print(int)
and then
println()
.
println
in class PrintStream
i
- The int
to be printed.public void println(long l)
print(long)
and then
println()
.
println
in class PrintStream
l
- a The long
to be printed.public void println(float fl)
print(float)
and then
println()
.
println
in class PrintStream
fl
- The float
to be printed.public void println(double dfl)
print(double)
and then
println()
.
println
in class PrintStream
dfl
- The double
to be printed.public void println(char[] ach)
print(char[])
and
then println()
.
println
in class PrintStream
ach
- an array of chars to print.public void println(String s)
print(String)
and then
println()
.
println
in class PrintStream
s
- The String
to be printed.public void println(Object o)
print(Object)
and then
println()
.
println
in class PrintStream
o
- The Object
to be printed.
|
CoherenceTM v3.3 Copyright© 2000-2007 by Oracle Corporation |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |