public abstract class AbstractInputStreamWrapper extends InputStream
Provides common functionality to the easystream library:
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
closeCalled |
protected InputStream |
source |
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractInputStreamWrapper(InputStream source)
Constructor for AbstractInputStreamWrapper.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
protected abstract void |
closeOnce()
closeOnce
|
protected abstract int |
innerRead(byte[] b,
int off,
int len)
innerRead
|
int |
read() |
int |
read(byte[] b,
int off,
int len) |
long |
skip(long n) |
available, mark, markSupported, read, resetprotected boolean closeCalled
protected final InputStream source
protected AbstractInputStreamWrapper(InputStream source)
Constructor for AbstractInputStreamWrapper.
source - the InputStream that is wrapped by this stream.public void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in class InputStreamIOExceptionprotected abstract void closeOnce()
throws IOException
closeOnce
IOException - if any error occurs reading the bytes.protected abstract int innerRead(byte[] b,
int off,
int len)
throws IOException
innerRead
b - an array of byte.off - a int.len - a int.IOException - if any error occurs reading the bytes.public int read()
throws IOException
read in class InputStreamIOExceptionpublic final int read(byte[] b,
int off,
int len)
throws IOException
read in class InputStreamIOExceptionpublic long skip(long n)
throws IOException
skip in class InputStreamIOExceptionCopyright © 2008–2016. All rights reserved.