? TeeOutputStream
java.lang.Object
java.io.OutputStream
java.io.FilterOutputStream
org.apache.commons.io.output.ProxyOutputStream
org.apache.commons.io.output.TeeOutputStream
- ????????:
Closeable
,Flushable
,AutoCloseable
Classic splitter of
OutputStream
. Named after the Unix 'tee' command. It allows a stream to be branched off
so there are now two streams.-
????
????????? java.io.FilterOutputStream
out
-
?????
??? -
????
??????? org.apache.commons.io.output.ProxyOutputStream
afterWrite, beforeWrite, handleIOException
??????? java.io.OutputStream
nullOutputStream
-
??????
-
branch
The second OutputStream to write to. TODO Make private and final in 3.0.
-
-
???????
-
TeeOutputStream
Constructs a TeeOutputStream.- ??:
out
- the main OutputStreambranch
- the second OutputStream
-
-
??????
-
write
Writes the bytes to both streams.- ??:
write
???ProxyOutputStream
- ??:
b
- the bytes to write- ??:
IOException
- if an I/O error occurs.
-
write
Writes the specified bytes to both streams.- ??:
write
???ProxyOutputStream
- ??:
b
- the bytes to writeoff
- The start offsetlen
- The number of bytes to write- ??:
IOException
- if an I/O error occurs.
-
write
Writes a byte to both streams.- ??:
write
???ProxyOutputStream
- ??:
b
- the byte to write- ??:
IOException
- if an I/O error occurs.
-
flush
Flushes both streams.- ???:
flush
????Flushable
- ??:
flush
???ProxyOutputStream
- ??:
IOException
- if an I/O error occurs.
-
close
Closes both output streams.If closing the main output stream throws an exception, attempt to close the branch output stream.
If closing the main and branch output streams both throw exceptions, which exceptions is thrown by this method is currently unspecified and subject to change.
- ???:
close
????AutoCloseable
- ???:
close
????Closeable
- ??:
close
???ProxyOutputStream
- ??:
IOException
- if an I/O error occurs.
-