@Beta public final class CountingInputStream extends FilterInputStream
InputStream that counts the number of bytes read.
in| Constructor and Description |
|---|
CountingInputStream(InputStream
Wraps another input stream, counting the number of bytes read.
|
| Modifier and Type | Method and Description |
|---|---|
long |
getCount()
Returns the number of bytes read.
|
void |
mark(int readlimit)
|
int |
read()
|
int |
read(byte[] b, int off, int len)
|
void |
reset()
|
long |
skip(long n)
|
available, close, markSupported, readpublic CountingInputStream(InputStreamin)
in - the input stream to be wrapped
public long getCount()
public int read()
throws IOException
read in class
FilterInputStream
IOException
public int read(byte[] b,
int off,
int len)
throws IOException
read in class
FilterInputStream
IOException
public long skip(long n)
throws IOException
skip in class
FilterInputStream
IOException
public void mark(int readlimit)
public void reset()
throws IOException
reset in class
FilterInputStream
IOException