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