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 OutputStream
IOException
public void write(byte[] b) throws IOException
write
in class OutputStream
IOException
public void write(byte[] b, int off, int len) throws IOException
write
in class OutputStream
IOException
public void flush() throws IOException
flush
in interface Flushable
flush
in class OutputStream
IOException
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
close
in class OutputStream
IOException
Copyright © 2015–2019. All rights reserved.