public final class CountingInputStream extends FilterInputStream
InputStream that counts the number of bytes read.
initial count can be providedin| Constructor and Description |
|---|
CountingInputStream(InputStream in,
long count)
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) |
String |
toString() |
available, close, markSupported, readpublic CountingInputStream(@Nonnull InputStream in, long count)
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 © 2018 SPF4J. All rights reserved.