public class MultiStream
extends java.io.OutputStream
| Modifier and Type | Field and Description | 
|---|---|
| protected java.util.Set | disabledThe disabled streams. | 
| protected java.io.OutputStream[] | outsThe output streams. | 
| Constructor and Description | 
|---|
| MultiStream(java.io.OutputStream[] outs)Create a new multi stream. | 
| Modifier and Type | Method and Description | 
|---|---|
| void | close()Close the streams. | 
| void | flush()Flush the streams. | 
| java.io.OutputStream[] | getOutputStreams()Get the output streams. | 
| void | setEnabled(java.io.OutputStream out,
          boolean enabled)Set the enabled state of a stream. | 
| void | setOutputStreams(java.io.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. | 
protected java.io.OutputStream[] outs
protected java.util.Set disabled
public MultiStream(java.io.OutputStream[] outs)
outs - The output streams.public void write(int b)
           throws java.io.IOException
write in class java.io.OutputStreamb - The byte.java.io.IOExceptionpublic void write(byte[] b,
                  int off,
                  int len)
           throws java.io.IOException
write in class java.io.OutputStreamb - The byte.off - The start offset.len - The length.java.io.IOExceptionpublic void close()
           throws java.io.IOException
close in interface java.io.Closeableclose in interface java.lang.AutoCloseableclose in class java.io.OutputStreamjava.io.IOExceptionpublic void flush()
           throws java.io.IOException
flush in interface java.io.Flushableflush in class java.io.OutputStreamjava.io.IOExceptionpublic java.io.OutputStream[] getOutputStreams()
public void setOutputStreams(java.io.OutputStream[] outs)
outs - The output streams.public void setEnabled(java.io.OutputStream out,
                       boolean enabled)
out - The output stream.enabled - The enabled state.