org.gjt.jclasslib.io
Class CountedInputStream
java.lang.Object
java.io.InputStream
java.io.FilterInputStream
org.gjt.jclasslib.io.CountedInputStream
- public class CountedInputStream
- extends FilterInputStream
InputStream which counts the number of bytes read.
- Version:
- $Revision: 1.3 $ $Date: 2003/08/18 07:58:12 $
- Author:
- Ingo Kegel
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CountedInputStream
public CountedInputStream(InputStream in)
- Constructor.
- Parameters:
in
- the input stream.
read
public int read()
throws IOException
- Throws:
IOException
read
public int read(byte[] b)
throws IOException
- Throws:
IOException
read
public int read(byte[] b,
int offset,
int len)
throws IOException
- Throws:
IOException
skip
public long skip(long n)
throws IOException
- Throws:
IOException
markSupported
public boolean markSupported()
getBytesRead
public int getBytesRead()
- Get the number of bytes read.
- Returns:
- the number of bytes