public class MeteredInputStream extends FilterInputStream implements MeteredStream
FilterInputStream that counts the bytes read from the underlying InputStream.in| Modifier and Type | Method and Description |
|---|---|
static com.google.common.base.Optional<MeteredInputStream> |
findWrappedMeteredInputStream(InputStream is)
Find the lowest
MeteredInputStream in a chain of FilterInputStreams. |
Meter |
getBytesProcessedMeter() |
int |
read() |
int |
read(byte[] b,
int off,
int len) |
available, close, mark, markSupported, read, reset, skippublic static com.google.common.base.Optional<MeteredInputStream> findWrappedMeteredInputStream(InputStream is)
MeteredInputStream in a chain of FilterInputStreams.public int read()
throws IOException
read in class FilterInputStreamIOExceptionpublic int read(byte[] b,
int off,
int len)
throws IOException
read in class FilterInputStreamIOExceptionpublic Meter getBytesProcessedMeter()
getBytesProcessedMeter in interface MeteredStreamMeter measuring the bytes processed.