public class InputStreamWrapper extends InputStream
InputStream that wraps another InputStream to delegate from.| Modifier and Type | Field and Description |
|---|---|
private boolean |
closed |
private InputStream |
delegate |
| Constructor and Description |
|---|
InputStreamWrapper(InputStream delegate)
The constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
protected InputStream |
getDelegate() |
int |
read() |
int |
read(byte[] b) |
int |
read(byte[] b,
int off,
int len) |
protected void |
requireNotClosed() |
available, mark, markSupported, reset, skipprivate final InputStream delegate
private boolean closed
public InputStreamWrapper(InputStream delegate)
delegate - the delegate. May not be null.protected InputStream getDelegate()
InputStream to delegate from. May not be null.protected void requireNotClosed()
throws IOException
IOException - if the stream has already been closed.public int read()
throws IOException
read in class InputStreamIOExceptionpublic final int read(byte[] b)
throws IOException
read in class InputStreamIOExceptionpublic int read(byte[] b,
int off,
int len)
throws IOException
read in class InputStreamIOExceptionpublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in class InputStreamIOExceptionCopyright © 2001–2019 mmm-Team. All rights reserved.