| 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.io.OutputStream
java.io.FilterOutputStream
org.apache.commons.io.output.ProxyOutputStream
org.apache.commons.io.output.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.
| Field Summary | |
|---|---|
protected  OutputStream | 
branch
the second OutputStream to write to  | 
| Fields inherited from class java.io.FilterOutputStream | 
|---|
out | 
| Constructor Summary | |
|---|---|
TeeOutputStream(OutputStream out,
                               OutputStream branch)
Constructs a TeeOutputStream.  | 
|
| Method Summary | |
|---|---|
 void | 
close()
Closes both streams.  | 
 void | 
flush()
Flushes both streams.  | 
 void | 
write(byte[] b)
Write the bytes to both streams.  | 
 void | 
write(byte[] b,
           int off,
           int len)
Write the specified bytes to both streams.  | 
 void | 
write(int b)
Write a byte to both streams.  | 
| Methods inherited from class org.apache.commons.io.output.ProxyOutputStream | 
|---|
afterWrite, beforeWrite, handleIOException | 
| Methods inherited from class java.lang.Object | 
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Field Detail | 
|---|
protected OutputStream branch
| Constructor Detail | 
|---|
public TeeOutputStream(OutputStream out,
                       OutputStream branch)
out - the main OutputStreambranch - the second OutputStream| Method Detail | 
|---|
public void write(byte[] b)
           throws IOException
write in class ProxyOutputStreamb - the bytes to write
IOException - if an I/O error occurs
public void write(byte[] b,
                  int off,
                  int len)
           throws IOException
write in class ProxyOutputStreamb - the bytes to writeoff - The start offsetlen - The number of bytes to write
IOException - if an I/O error occurs
public void write(int b)
           throws IOException
write in class ProxyOutputStreamb - the byte to write
IOException - if an I/O error occurs
public void flush()
           throws IOException
flush in interface Flushableflush in class ProxyOutputStreamIOException - if an I/O error occurs
public void close()
           throws IOException
close in interface Closeableclose in class ProxyOutputStreamIOException - if an I/O error occurs
  | 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||