java.io.Closeable, java.io.Flushable, java.lang.AutoCloseablepublic class TeeOutputStream
extends java.io.OutputStream
| Constructor | Description |
|---|---|
TeeOutputStream(java.io.OutputStream left,
java.io.OutputStream right) |
Constructor for TeeOutputStream.
|
| Modifier and Type | Method | Description |
|---|---|---|
void |
close() |
Close both output streams.
|
void |
flush() |
Flush both output streams.
|
void |
write(byte[] b) |
Write a byte array to both output streams.
|
void |
write(byte[] b,
int off,
int len) |
Write a byte array to both output streams.
|
void |
write(int b) |
Write a byte to both output streams.
|
public TeeOutputStream(java.io.OutputStream left,
java.io.OutputStream right)
left - one of the output streams.right - the other output stream.public void close()
throws java.io.IOException
close in interface java.lang.AutoCloseableclose in interface java.io.Closeableclose in class java.io.OutputStreamjava.io.IOException - on error.public void flush()
throws java.io.IOException
flush in interface java.io.Flushableflush in class java.io.OutputStreamjava.io.IOException - on errorpublic void write(byte[] b)
throws java.io.IOException
write in class java.io.OutputStreamb - an array of bytes.java.io.IOException - on error.public void write(byte[] b,
int off,
int len)
throws java.io.IOException
write in class java.io.OutputStreamb - the data.off - the start offset in the data.len - the number of bytes to write.java.io.IOException - on error.public void write(int b)
throws java.io.IOException
write in class java.io.OutputStreamb - the byte to write.java.io.IOException - on error.