org.apache.commons.io.output
Class ProxyOutputStream

java.lang.Object
  extended byjava.io.OutputStream
      extended byjava.io.FilterOutputStream
          extended byorg.apache.commons.io.output.ProxyOutputStream
Direct Known Subclasses:
CountingOutputStream, TeeOutputStream

public class ProxyOutputStream
extends java.io.FilterOutputStream

A Proxy stream which acts as expected, that is it passes the method calls on to the proxied stream and doesn't change which methods are being called. It is an alternative base class to FilterOutputStream to increase reusability.


Field Summary
private  java.io.OutputStream proxy
           
 
Fields inherited from class java.io.FilterOutputStream
out
 
Constructor Summary
ProxyOutputStream(java.io.OutputStream proxy)
          Constructs a new ProxyOutputStream.
 
Method Summary
 void close()
           
 void flush()
           
 void write(byte[] bts)
           
 void write(byte[] bts, int st, int end)
           
 void write(int idx)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

proxy

private java.io.OutputStream proxy
Constructor Detail

ProxyOutputStream

public ProxyOutputStream(java.io.OutputStream proxy)
Constructs a new ProxyOutputStream.

Parameters:
proxy - OutputStream to delegate to
Method Detail

write

public void write(int idx)
           throws java.io.IOException
Throws:
java.io.IOException
See Also:
OutputStream.write(int)

write

public void write(byte[] bts)
           throws java.io.IOException
Throws:
java.io.IOException
See Also:
OutputStream.write(byte[])

write

public void write(byte[] bts,
                  int st,
                  int end)
           throws java.io.IOException
Throws:
java.io.IOException
See Also:
OutputStream.write(byte[], int, int)

flush

public void flush()
           throws java.io.IOException
Throws:
java.io.IOException
See Also:
OutputStream.flush()

close

public void close()
           throws java.io.IOException
Throws:
java.io.IOException
See Also:
OutputStream.close()