de.unkrig.commons.io
Class ProxyOutputStream

java.lang.Object
  extended by java.io.OutputStream
      extended by java.io.FilterOutputStream
          extended by de.unkrig.commons.io.ProxyOutputStream
All Implemented Interfaces:
java.io.Closeable, java.io.Flushable

public class ProxyOutputStream
extends java.io.FilterOutputStream

A FilterOutputStream where the delegate can also be changed after construction.


Field Summary
 
Fields inherited from class java.io.FilterOutputStream
out
 
Constructor Summary
ProxyOutputStream(java.io.OutputStream delegate)
           
 
Method Summary
 void setDelegate(java.io.OutputStream delegate)
           
 void write(byte[] ba, int off, int len)
           
 
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

ProxyOutputStream

public ProxyOutputStream(java.io.OutputStream delegate)
Method Detail

setDelegate

public void setDelegate(java.io.OutputStream delegate)
Parameters:
delegate - The new delegate

write

public void write(byte[] ba,
                  int off,
                  int len)
           throws java.io.IOException
Overrides:
write in class java.io.FilterOutputStream
Throws:
java.io.IOException