com.sibvisions.util.io
Class ShadowCopyOutputStream

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

public class ShadowCopyOutputStream
extends java.io.FilterOutputStream

The ShadowCopyOutputStream is an OutputStream wrapper that copies every written byte to an internal cache.


Field Summary
 
Fields inherited from class java.io.FilterOutputStream
out
 
Constructor Summary
ShadowCopyOutputStream(java.io.OutputStream pStream)
          Creates a new instance of ShadowCopyOutputStream.
 
Method Summary
 void clear()
          Clears the internal cache.
 byte[] dump()
          Gets the 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

ShadowCopyOutputStream

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

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

dump

public byte[] dump()
Gets the written bytes.

Returns:
the bytes

clear

public void clear()
Clears the internal cache.



Copyright © 2009 SIB Visions GmbH. All Rights Reserved.