@Beta @GwtIncompatible public final class CountingInputStream extends FilterInputStream
InputStream that counts the number of bytes read.in| Constructor and Description |
|---|
CountingInputStream(InputStream in)
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(InputStream in)
in - the input stream to be wrappedpublic long getCount()
public int read() throws IOException
read in class FilterInputStreamIOExceptionpublic int read(byte[] b, int off, int len) throws IOException
read in class FilterInputStreamIOExceptionpublic long skip(long n) throws IOException
skip in class FilterInputStreamIOExceptionpublic void mark(int readlimit)
mark in class FilterInputStreampublic void reset() throws IOException
reset in class FilterInputStreamIOExceptionCopyright © 2010–2017. All rights reserved.