de.grogra.util
public class CountingInputStream extends java.io.FilterInputStream
| Modifier and Type | Class and Description |
|---|---|
static interface |
CountingInputStream.Monitor |
| Modifier and Type | Field and Description |
|---|---|
protected long |
bytesRead |
| Constructor and Description |
|---|
CountingInputStream(java.io.InputStream in) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
long |
getBytesRead() |
void |
mark(int readlimit) |
int |
read() |
int |
read(byte[] b) |
int |
read(byte[] b,
int off,
int len) |
void |
reset() |
void |
setMonitor(CountingInputStream.Monitor monitor,
long resolution) |
long |
skip(long n) |
public void close()
throws java.io.IOException
close in interface java.io.Closeableclose in class java.io.FilterInputStreamjava.io.IOExceptionpublic long getBytesRead()
public void mark(int readlimit)
mark in class java.io.FilterInputStreampublic int read()
throws java.io.IOException
read in class java.io.FilterInputStreamjava.io.IOExceptionpublic int read(byte[] b)
throws java.io.IOException
read in class java.io.FilterInputStreamjava.io.IOExceptionpublic int read(byte[] b,
int off,
int len)
throws java.io.IOException
read in class java.io.FilterInputStreamjava.io.IOExceptionpublic void reset()
throws java.io.IOException
reset in class java.io.FilterInputStreamjava.io.IOExceptionpublic void setMonitor(CountingInputStream.Monitor monitor, long resolution)
public long skip(long n)
throws java.io.IOException
skip in class java.io.FilterInputStreamjava.io.IOException