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 void
addStream(java.io.OutputStream stream)
void
close()
void
flush()
java.util.ArrayList<java.io.OutputStream>
getStreams()
void
removeStream(java.io.OutputStream stream)
void
write(int b)
Methods inherited from class java.io.OutputStream
nullOutputStream, write, write
Methods 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:
write
in classjava.io.OutputStream
- Throws:
java.io.IOException
-
flush
public void flush() throws java.io.IOException- Specified by:
flush
in interfacejava.io.Flushable
- Overrides:
flush
in classjava.io.OutputStream
- Throws:
java.io.IOException
-
close
public void close() throws java.io.IOException- Specified by:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in interfacejava.io.Closeable
- Overrides:
close
in classjava.io.OutputStream
- Throws:
java.io.IOException
-