public class CountingInputStream extends WrappedInputStream
InputStream that counts the number of read bytes.in| Constructor and Description |
|---|
CountingInputStream(InputStream aSourceIS) |
| Modifier and Type | Method and Description |
|---|---|
long |
getBytesRead() |
long |
getPosition() |
void |
mark(int nReadlimit) |
int |
read() |
int |
read(byte[] b,
int nOffset,
int nLength) |
void |
reset() |
long |
skip(long n) |
String |
toString() |
getWrappedInputStreamavailable, close, markSupported, readpublic CountingInputStream(@Nonnull InputStream aSourceIS)
public int read()
throws IOException
read in class FilterInputStreamIOExceptionpublic int read(byte[] b,
int nOffset,
int nLength)
throws IOException
read in class FilterInputStreamIOExceptionpublic long skip(@Nonnegative long n) throws IOException
skip in class FilterInputStreamIOExceptionpublic void mark(@Nonnegative int nReadlimit)
mark in class FilterInputStreampublic void reset()
throws IOException
reset in class FilterInputStreamIOException@Nonnegative public long getBytesRead()
@Nonnegative public long getPosition()
public String toString()
toString in class WrappedInputStreamCopyright © 2014–2017 Philip Helger. All rights reserved.