public class ChunkedOutputStream extends PrintStream
| Constructor and Description |
|---|
ChunkedOutputStream(PrintStream o) |
ChunkedOutputStream(PrintStream o,
int size) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
checkError()
Flushes the stream and checks its error state.
|
void |
close()
Closes the stream.
|
void |
flush()
Flushes the stream.
|
void |
reset() |
int |
size() |
void |
write(byte[] b,
int off,
int len)
Writes
len bytes from the specified byte array starting at offset off
to this stream. |
void |
write(int _b)
Writes the specified byte to this stream.
|
append, append, append, clearError, print, print, print, print, print, print, print, print, print, println, println, println, println, println, println, println, println, println, println, setErrorwritepublic ChunkedOutputStream(PrintStream o)
public ChunkedOutputStream(PrintStream o, int size)
public boolean checkError()
PrintStreamtrue 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 PrintStreamtrue if and only if this stream has encountered an IOException
other than InterruptedIOException, or the setError method has
been invokedpublic void close()
PrintStreamclose in interface Closeableclose in interface AutoCloseableclose in class PrintStreamOutputStream.close()public void flush()
PrintStreamflush in interface Flushableflush in class PrintStreamOutputStream.flush()public void reset()
public int size()
public void write(byte[] b,
int off,
int len)
PrintStreamlen 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 class PrintStreamb - A byte arrayoff - Offset from which to start taking byteslen - Number of bytes to writeFilterOutputStream.write(int)public void write(int _b)
PrintStreamflush 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 class PrintStream_b - The byte to be writtenPrintStream.print(char),
PrintStream.println(char)