org.apache.commons.io.output
Class TeeOutputStream
public class TeeOutputStream
Classic splitter of OutputStream. Named after the unix 'tee'
command. It allows a stream to be branched off so there
are now two streams.
$Id: TeeOutputStream.java,v 1.6 2004/02/23 04:53:04 bayard Exp $protected OutputStream | branch - the second OutputStream to write to
|
TeeOutputStream(OutputStream out, OutputStream branch) - Constructs a TeeOutputStream.
|
void | close() - Closes both streams.
|
void | flush() - Flushes both streams.
|
void | write(byte[] b)
|
void | write(byte[] b, int off, int len)
|
void | write(int b)
|
branch
protected OutputStream branch
the second OutputStream to write to
TeeOutputStream
public TeeOutputStream(OutputStream out,
OutputStream branch)
Constructs a TeeOutputStream.
out
- the main OutputStreambranch
- the second OutputStream
close
public void close()
throws IOException
Closes both streams.
- close in interface ProxyOutputStream
java.io.OutputStream.close()
flush
public void flush()
throws IOException
Flushes both streams.
- flush in interface ProxyOutputStream
java.io.OutputStream.flush()
write
public void write(byte[] b)
throws IOException
- write in interface ProxyOutputStream
java.io.OutputStream.write(byte[])
write
public void write(byte[] b,
int off,
int len)
throws IOException
- write in interface ProxyOutputStream
java.io.OutputStream.write(byte[], int, int)
write
public void write(int b)
throws IOException
- write in interface ProxyOutputStream
java.io.OutputStream.write(int)