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