Closeable, AutoCloseablepublic class LookaheadInputStream extends FilterInputStream
in| Constructor | Description |
|---|---|
LookaheadInputStream(int lookaheadSize) |
Configure a stream that hides a number of bytes from the reader.
|
| Modifier and Type | Method | Description |
|---|---|---|
boolean |
getEOFReached() |
|
byte[] |
getFooter() |
Grab the lookahead footer.
|
void |
initialize(InputStream src) |
Start the LookaheadInputStream with the given input stream.
|
int |
read() |
|
int |
read(byte[] buf,
int off,
int len) |
|
long |
skip(long n) |
available, close, mark, markSupported, read, resetreadAllBytes, readNBytes, transferTopublic LookaheadInputStream(int lookaheadSize)
lookaheadSize - how many bytes to hidepublic boolean getEOFReached()
public void initialize(InputStream src) throws IOException
IOException - if less than lookaheadSize bytes could be read.public int read()
throws IOException
read in class FilterInputStreamIOExceptionpublic int read(byte[] buf,
int off,
int len)
throws IOException
read in class FilterInputStreamIOExceptionpublic byte[] getFooter()
public long skip(long n)
throws IOException
skip in class FilterInputStreamIOException