ReadCounter, Closeable, AutoCloseableLimitInputStreampublic 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, resetreadAllBytes, readNBytes, transferTopublic CountingInputStream(InputStream in)
public long skip(long n)
throws IOException
skip in class FilterInputStreamIOExceptionpublic long getRead()
ReadCountergetRead in interface ReadCounterpublic int read()
throws IOException
read in class FilterInputStreamIOExceptionpublic int read(byte[] buf,
int off,
int len)
throws IOException
read in class FilterInputStreamIOException