ReadCounter, Closeable, AutoCloseablepublic class EOFOnMatchInputStream extends PushbackInputStream implements ReadCounter
inbuf, pos| Constructor | Description |
|---|---|
EOFOnMatchInputStream(InputStream in,
byte[] match) |
Non-counter mode.
|
EOFOnMatchInputStream(InputStream in,
ReadCounter ctr,
byte[] match) |
Counter mode.
|
| Modifier and Type | Method | Description |
|---|---|---|
long |
getRead() |
If constructed with a counter, returns the count
(not necessarily starting at 0) minus the buffered/matched count.
|
int |
read() |
Debug only.
|
int |
read(byte[] buf,
int off,
int len) |
|
long |
skip(long n) |
|
boolean |
wasFound() |
readreadAllBytes, readNBytes, transferToclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitavailable, close, mark, markSupported, reset, unread, unread, unreadpublic EOFOnMatchInputStream(InputStream in, byte[] match)
match - will be copiedpublic EOFOnMatchInputStream(InputStream in, ReadCounter ctr, byte[] match)
match - will be copiedpublic long getRead()
getRead in interface ReadCounterpublic boolean wasFound()
public int read()
throws IOException
read in class PushbackInputStreamIOExceptionpublic int read(byte[] buf,
int off,
int len)
throws IOException
read in class PushbackInputStreamIOExceptionpublic long skip(long n)
throws IOException
skip in class PushbackInputStreamIOException