public final class ReusableBufferedOutputStream extends BufferedOutputStream
BufferedOutputStream with a reset(OutputStream) method
that allows an instance to be re-used with another underlying output stream.buf, countout| Constructor and Description |
|---|
ReusableBufferedOutputStream(OutputStream out) |
ReusableBufferedOutputStream(OutputStream out,
int size) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
void |
reset(OutputStream out)
Resets this stream and uses the given output stream for writing.
|
flush, write, writewritepublic ReusableBufferedOutputStream(OutputStream out)
public ReusableBufferedOutputStream(OutputStream out, int size)
public void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in class FilterOutputStreamIOExceptionpublic void reset(OutputStream out)
out - New output stream to be used for writing.IllegalStateException - If the stream isn't closed.