public class MultiStream extends OutputStream
| Constructor and Description |
|---|
MultiStream(OutputStream[] outs)
Create a new multi stream.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close the streams.
|
void |
flush()
Flush the streams.
|
OutputStream[] |
getOutputStreams()
Get the output streams.
|
void |
setEnabled(OutputStream out,
boolean enabled)
Set the enabled state of a stream.
|
void |
setOutputStreams(OutputStream[] outs)
Set the output streams.
|
void |
write(byte[] b,
int off,
int len)
Write a byte array to the streams.
|
void |
write(int b)
Write a byte to the streams.
|
writepublic MultiStream(OutputStream[] outs)
outs - The output streams.public void write(int b)
throws IOException
write in class OutputStreamb - The byte.IOExceptionpublic void write(byte[] b,
int off,
int len)
throws IOException
write in class OutputStreamb - The byte.off - The start offset.len - The length.IOExceptionpublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in class OutputStreamIOExceptionpublic void flush()
throws IOException
flush in interface Flushableflush in class OutputStreamIOExceptionpublic OutputStream[] getOutputStreams()
public void setOutputStreams(OutputStream[] outs)
outs - The output streams.public void setEnabled(OutputStream out, boolean enabled)
out - The output stream.enabled - The enabled state.Copyright © 2012. All Rights Reserved.