ej-technologies

org.gjt.jclasslib.io
Class CountedInputStream

java.lang.Object
  extended byjava.io.InputStream
      extended byjava.io.FilterInputStream
          extended byorg.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

Field Summary
 
Fields inherited from class java.io.FilterInputStream
in
 
Constructor Summary
CountedInputStream(InputStream in)
          Constructor.
 
Method Summary
 int getBytesRead()
          Get the number of bytes read.
 boolean markSupported()
           
 int read()
           
 int read(byte[] b)
           
 int read(byte[] b, int offset, int len)
           
 long skip(long n)
           
 
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
 

Constructor Detail

CountedInputStream

public CountedInputStream(InputStream in)
Constructor.

Parameters:
in - the input stream.
Method Detail

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

ej-technologies