org.apache.commons.io.output
Class ProxyOutputStream
java.lang.Object
java.io.OutputStream
java.io.FilterOutputStream
org.apache.commons.io.output.ProxyOutputStream
- All Implemented Interfaces:
- java.io.Closeable, java.io.Flushable
- 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.
- Version:
- $Id: ProxyOutputStream.java 471628 2006-11-06 04:06:45Z bayard $
- Author:
- Stephen Colebourne
Fields inherited from class java.io.FilterOutputStream |
out |
Constructor Summary |
ProxyOutputStream(java.io.OutputStream proxy)
Constructs a new ProxyOutputStream. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ProxyOutputStream
public ProxyOutputStream(java.io.OutputStream proxy)
- Constructs a new ProxyOutputStream.
- Parameters:
proxy
- the OutputStream to delegate to
write
public void write(int idx)
throws java.io.IOException
- Overrides:
write
in class java.io.FilterOutputStream
- Throws:
java.io.IOException
- See Also:
OutputStream.write(int)
write
public void write(byte[] bts)
throws java.io.IOException
- Overrides:
write
in class java.io.FilterOutputStream
- Throws:
java.io.IOException
- See Also:
OutputStream.write(byte[])
write
public void write(byte[] bts,
int st,
int end)
throws java.io.IOException
- Overrides:
write
in class java.io.FilterOutputStream
- Throws:
java.io.IOException
- See Also:
OutputStream.write(byte[], int, int)
flush
public void flush()
throws java.io.IOException
- Specified by:
flush
in interface java.io.Flushable
- Overrides:
flush
in class java.io.FilterOutputStream
- Throws:
java.io.IOException
- See Also:
OutputStream.flush()
close
public void close()
throws java.io.IOException
- Specified by:
close
in interface java.io.Closeable
- Overrides:
close
in class java.io.FilterOutputStream
- Throws:
java.io.IOException
- See Also:
OutputStream.close()
Copyright © 2002-2007 The Apache Software Foundation. All Rights Reserved.