ReadCounter
, Closeable
, AutoCloseable
public class EOFOnMatchInputStream extends PushbackInputStream implements ReadCounter
in
buf, 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() |
read
readAllBytes, readNBytes, transferTo
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
available, close, mark, markSupported, reset, unread, unread, unread
public 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 ReadCounter
public boolean wasFound()
public int read() throws IOException
read
in class PushbackInputStream
IOException
public int read(byte[] buf, int off, int len) throws IOException
read
in class PushbackInputStream
IOException
public long skip(long n) throws IOException
skip
in class PushbackInputStream
IOException