public class OutputStreamWrapper extends OutputStream
OutputStream that wraps another OutputStream to delegate to.| Modifier and Type | Field and Description |
|---|---|
private boolean |
closed |
private OutputStream |
delegate |
| Constructor and Description |
|---|
OutputStreamWrapper()
The constructor.
|
OutputStreamWrapper(OutputStream delegate)
The constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
protected OutputStream |
getDelegate() |
protected boolean |
isClosed() |
protected void |
requireNotClosed() |
void |
write(byte[] b) |
void |
write(byte[] b,
int off,
int len) |
void |
write(int b) |
flushprivate final OutputStream delegate
private boolean closed
public OutputStreamWrapper()
public OutputStreamWrapper(OutputStream delegate)
delegate - the delegate. May be null.protected OutputStream getDelegate()
OutputStream to delegate to. May be null for none (/dev/null.protected void requireNotClosed()
throws IOException
IOException - if the stream has already been closed.public final 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 write(int b)
throws IOException
write in class OutputStreamIOExceptionpublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in class OutputStreamIOExceptionprotected boolean isClosed()
true if closed, false otherwise.Copyright © 2001–2019 mmm-Team. All rights reserved.