ej-technologies

org.gjt.jclasslib.io
Class CountedInputStream

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

Field Summary
 
Fields inherited from class java.io.FilterInputStream
in
 
Constructor Summary
CountedInputStream(java.io.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(java.io.InputStream in)
Constructor.

Parameters:
in - the input stream.
Method Detail

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

ej-technologies