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, reset
protected 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 Closeable
close
in interface AutoCloseable
close
in class InputStream
IOException
protected 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 InputStream
IOException
public final int read(byte[] b, int off, int len) throws IOException
read
in class InputStream
IOException
public long skip(long n) throws IOException
skip
in class InputStream
IOException
Copyright © 2008–2016. All rights reserved.