TUM CCSM Commons

edu.tum.cs.commons.io
Class MultiplexedOutputStream

java.lang.Object
  extended by java.io.OutputStream
      extended by edu.tum.cs.commons.io.MultiplexedOutputStream
All Implemented Interfaces:
java.io.Closeable, java.io.Flushable

public class MultiplexedOutputStream
extends java.io.OutputStream

This class enables multiplexing of output streams. It can be e.g. used to output content to multiple files.

Version:
$Rev: 26283 $
Author:
Florian Deissenboeck, $Author: juergens $
Rating:
GREEN Hash: 5DB2776C03CD4F1EF5CE43768985E2BD

Constructor Summary
MultiplexedOutputStream(java.io.OutputStream... streams)
          Create new multiplexed output streams.
 
Method Summary
 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.
 
Methods inherited from class java.io.OutputStream
write, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MultiplexedOutputStream

public MultiplexedOutputStream(java.io.OutputStream... streams)
Create new multiplexed output streams.

Parameters:
streams - any number of output streams.
Method Detail

close

public void close()
           throws java.io.IOException
Forwards close operation to all underlying output streams.

Specified by:
close in interface java.io.Closeable
Overrides:
close in class java.io.OutputStream
Throws:
java.io.IOException

flush

public void flush()
           throws java.io.IOException
Forwards flush operation to all underlying output streams.

Specified by:
flush in interface java.io.Flushable
Overrides:
flush in class java.io.OutputStream
Throws:
java.io.IOException

write

public void write(int b)
           throws java.io.IOException
Forwards write operation to all underlying output streams.

Specified by:
write in class java.io.OutputStream
Throws:
java.io.IOException

TUM CCSM Commons

TUM CCSM Commons - 2.7