public class TeeOutputStream extends OutputStream
| Constructor and Description |
|---|
TeeOutputStream(OutputStream left,
OutputStream right)
Constructor for TeeOutputStream.
|
| Modifier and Type | Method and 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(OutputStream left, OutputStream right)
left - one of the output streams.right - the other output stream.public void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in class OutputStreamIOException - on error.public void flush()
throws IOException
flush in interface Flushableflush in class OutputStreamIOException - on errorpublic void write(byte[] b)
throws IOException
write in class OutputStreamb - an array of bytes.IOException - on error.OutputStream.write(byte[], int, int)public void write(byte[] b,
int off,
int len)
throws IOException
write in class OutputStreamb - the data.off - the start offset in the data.len - the number of bytes to write.IOException - on error.public void write(int b)
throws IOException
write in class OutputStreamb - the byte to write.IOException - on error.