public class MultiplexedOutputStream extends java.io.OutputStream
Modifier and Type | Class and Description |
---|---|
static class |
MultiplexedOutputStream.MultiIOException
Exception class that encapsulates multiple
IOException s. |
Constructor and Description |
---|
MultiplexedOutputStream(java.io.OutputStream... streams)
Create new multiplexed output streams.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Forwards close operation to all underlying output streams.
|
void |
flush()
Forwards flush operation to all underlying output streams.
|
void |
write(int b)
Forwards write operation to all underlying output streams.
|
public MultiplexedOutputStream(java.io.OutputStream... streams)
streams
- any number of output streams.public void close() throws MultiplexedOutputStream.MultiIOException
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
close
in class java.io.OutputStream
MultiplexedOutputStream.MultiIOException
- if one or more of the underlying streams raised an exceptionpublic void flush() throws MultiplexedOutputStream.MultiIOException
flush
in interface java.io.Flushable
flush
in class java.io.OutputStream
MultiplexedOutputStream.MultiIOException
- if one or more of the underlying streams raised an exceptionpublic void write(int b) throws MultiplexedOutputStream.MultiIOException
write
in class java.io.OutputStream
MultiplexedOutputStream.MultiIOException
- if one or more of the underlying streams raised an exception