com.sibvisions.util.io
Class ByteCountOutputStream

java.lang.Object
  extended by java.io.OutputStream
      extended by java.io.FilterOutputStream
          extended by com.sibvisions.util.io.ByteCountOutputStream
All Implemented Interfaces:
java.io.Closeable, java.io.Flushable

public class ByteCountOutputStream
extends java.io.FilterOutputStream

The ByteCountOutputStream is an OutputStream wrapper which counts written bytes.


Field Summary
 
Fields inherited from class java.io.FilterOutputStream
out
 
Constructor Summary
ByteCountOutputStream(java.io.OutputStream pStream)
          Creates a new instance of ByteCountOutputStream.
 
Method Summary
 long getWrittenBytes()
          Gets the number of already written bytes.
 void write(int pByte)
          
 
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

ByteCountOutputStream

public ByteCountOutputStream(java.io.OutputStream pStream)
Creates a new instance of ByteCountOutputStream.

Parameters:
pStream - the wrapped stream
Method Detail

write

public void write(int pByte)
           throws java.io.IOException

Overrides:
write in class java.io.FilterOutputStream
Throws:
java.io.IOException

getWrittenBytes

public long getWrittenBytes()
Gets the number of already written bytes.

Returns:
the number of bytes


Copyright © 2009 SIB Visions GmbH. All Rights Reserved.