Package mgui.io.util
Class ParallelOutputStream
java.lang.Object
java.io.OutputStream
mgui.io.util.ParallelOutputStream
- All Implemented Interfaces:
java.io.Closeable,java.io.Flushable,java.lang.AutoCloseable
public class ParallelOutputStream
extends java.io.OutputStream
Simple class which writes to multiple output streams
- Author:
- Andrew Reid
-
Constructor Summary
Constructors Constructor Description ParallelOutputStream()ParallelOutputStream(java.util.ArrayList<java.io.OutputStream> streams) -
Method Summary
Modifier and Type Method Description voidaddStream(java.io.OutputStream stream)voidclose()voidflush()java.util.ArrayList<java.io.OutputStream>getStreams()voidremoveStream(java.io.OutputStream stream)voidwrite(int b)Methods inherited from class java.io.OutputStream
nullOutputStream, write, writeMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
ParallelOutputStream
public ParallelOutputStream() -
ParallelOutputStream
public ParallelOutputStream(java.util.ArrayList<java.io.OutputStream> streams)
-
-
Method Details
-
addStream
public void addStream(java.io.OutputStream stream) -
removeStream
public void removeStream(java.io.OutputStream stream) -
getStreams
public java.util.ArrayList<java.io.OutputStream> getStreams() -
write
public void write(int b) throws java.io.IOException- Specified by:
writein classjava.io.OutputStream- Throws:
java.io.IOException
-
flush
public void flush() throws java.io.IOException- Specified by:
flushin interfacejava.io.Flushable- Overrides:
flushin classjava.io.OutputStream- Throws:
java.io.IOException
-
close
public void close() throws java.io.IOException- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfacejava.io.Closeable- Overrides:
closein classjava.io.OutputStream- Throws:
java.io.IOException
-