public class UncloseableOutputStream extends OutputStream
An OutputStream which can't be closed.
Calls of the close() method don't have any effect on the underlying
stream.
| Constructor and Description |
|---|
UncloseableOutputStream(OutputStream out)
Creates a stream.
|
UncloseableOutputStream(OutputStream out,
CloseHandler closeHandler)
Creates a stream.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
void |
flush() |
void |
write(byte[] b) |
void |
write(byte[] b,
int off,
int len) |
void |
write(int b) |
public UncloseableOutputStream(OutputStream out)
Creates a stream.
out - The underlying stream.IllegalArgumentException - If the underlying stream is null.public UncloseableOutputStream(OutputStream out, CloseHandler closeHandler)
Creates a stream.
out - The underlying stream.closeHandler - The close handler.IllegalArgumentException - If any of the parameters are null.public void write(int b)
throws IOException
write in class OutputStreamIOExceptionpublic void write(byte[] b)
throws IOException
write in class OutputStreamIOExceptionpublic void write(byte[] b,
int off,
int len)
throws IOException
write in class OutputStreamIOExceptionpublic void flush()
throws IOException
flush in interface Flushableflush in class OutputStreamIOExceptionpublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in class OutputStreamIOExceptionCopyright © 2015–2019. All rights reserved.