@NotThreadSafe final class CountingInputStream extends DecoratingInputStream
| Modifier and Type | Field and Description |
|---|---|
private long |
bytesRead
The number of bytes read.
|
delegate| Constructor and Description |
|---|
CountingInputStream(InputStream in)
Constructs a new counting input stream.
|
| Modifier and Type | Method and Description |
|---|---|
long |
getBytesRead() |
int |
read() |
int |
read(byte[] b,
int off,
int len) |
long |
skip(long n) |
available, close, mark, markSupported, read, reset, toString@CreatesObligation CountingInputStream(@Nullable@WillCloseWhenClosed InputStream in)
in - the decorated input stream.public long getBytesRead()
public int read()
throws IOException
read in class DecoratingInputStreamIOExceptionpublic int read(byte[] b,
int off,
int len)
throws IOException
read in class DecoratingInputStreamIOExceptionpublic long skip(long n)
throws IOException
skip in class DecoratingInputStreamIOExceptionCopyright © 2005-2012 Schlichtherle IT Services. All Rights Reserved.