ReadCounter
, Closeable
, AutoCloseable
LimitInputStream
public class CountingInputStream extends FilterInputStream implements ReadCounter
Modifier and Type | Field | Description |
---|---|---|
protected long |
count |
in
Constructor | Description |
---|---|
CountingInputStream(InputStream in) |
Modifier and Type | Method | Description |
---|---|---|
long |
getRead() |
The total number of bytes that have been read or skipped
|
int |
read() |
|
int |
read(byte[] buf,
int off,
int len) |
|
long |
skip(long n) |
available, close, mark, markSupported, read, reset
readAllBytes, readNBytes, transferTo
public CountingInputStream(InputStream in)
public long skip(long n) throws IOException
skip
in class FilterInputStream
IOException
public long getRead()
ReadCounter
getRead
in interface ReadCounter
public int read() throws IOException
read
in class FilterInputStream
IOException
public int read(byte[] buf, int off, int len) throws IOException
read
in class FilterInputStream
IOException