Class ProxyOutputStream

java.lang.Object
java.io.OutputStream
java.io.FilterOutputStream
org.apache.commons.io.output.ProxyOutputStream
All Implemented Interfaces:
Closeable, Flushable, AutoCloseable
Direct Known Subclasses:
CloseShieldOutputStream, CountingOutputStream, TaggedOutputStream, TeeOutputStream

public class ProxyOutputStream extends 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.

See the protected methods for ways in which a subclass can easily decorate a stream with custom pre-, post- or error processing functionality.

  • Constructor Details

    • ProxyOutputStream

      public ProxyOutputStream(OutputStream delegate)
      Constructs a new ProxyOutputStream.
      Parameters:
      delegate - the OutputStream to delegate to
  • Method Details