ej-technologies

org.gjt.jclasslib.io
Class CountedOutputStream

java.lang.Object
  extended by java.io.OutputStream
      extended by java.io.FilterOutputStream
          extended by org.gjt.jclasslib.io.CountedOutputStream
All Implemented Interfaces:
java.io.Closeable, java.io.Flushable

public class CountedOutputStream
extends java.io.FilterOutputStream

OutputStream which counts the number of bytes written.

Version:
$Revision: 1.4 $ $Date: 2004-12-28 13:04:31 $
Author:
Ingo Kegel

Field Summary
 
Fields inherited from class java.io.FilterOutputStream
out
 
Constructor Summary
CountedOutputStream(java.io.OutputStream out)
          Constructor.
 
Method Summary
 int getBytesWritten()
          Get the number of bytes written.
 void write(int b)
           
 
Methods inherited from class java.io.FilterOutputStream
close, flush, write, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CountedOutputStream

public CountedOutputStream(java.io.OutputStream out)
Constructor.

Parameters:
out - the output stream.
Method Detail

write

public void write(int b)
           throws java.io.IOException
Overrides:
write in class java.io.FilterOutputStream
Throws:
java.io.IOException

getBytesWritten

public int getBytesWritten()
Get the number of bytes written.

Returns:
the number of bytes

ej-technologies