org.apache.commons.io.output

Class ProxyOutputStream

Known Direct Subclasses:
CountingOutputStream, 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.

Field Summary

private OutputStream
proxy

Constructor Summary

ProxyOutputStream(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)

Field Details

proxy

private OutputStream proxy

Constructor Details

ProxyOutputStream

public ProxyOutputStream(OutputStream proxy)
Constructs a new ProxyOutputStream.
Parameters:
proxy - OutputStream to delegate to

Method Details

close

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

flush

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

write

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

write

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

write

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