public class UncloseableOutputStream extends FilterOutputStream
FilterOutputStream where the close() method is disabled. Use this
class to pass an OutputStream to another method, to make sure that the method
is unable to close your stream unintentionally.out| Constructor and Description |
|---|
UncloseableOutputStream(OutputStream out)
Creates a new UncloseableOutputStream.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Does not close the
OutputStream. |
flush, write, write, writepublic UncloseableOutputStream(OutputStream out)
out - OutputStream to make sure it will not be closed.public void close() throws IOException
OutputStream. It will only be flushed.close in interface Closeableclose in interface AutoCloseableclose in class FilterOutputStreamIOExceptionCopyright © 2004–2016. All rights reserved.