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