org.abstracthorizon.mercury.common.io
Class StreamSplitter
java.lang.Object
java.io.OutputStream
org.abstracthorizon.mercury.common.io.StreamSplitter
- All Implemented Interfaces:
- Closeable, Flushable
public class StreamSplitter
- extends OutputStream
This output stream writes out to both supplied streams at the same time.
- Author:
- Daniel Sendula
Method Summary |
void |
write(byte[] b)
|
void |
write(byte[] b,
int o,
int l)
|
void |
write(int b)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
stream1
protected OutputStream stream1
- Fist stream
stream2
protected OutputStream stream2
- Second stream
StreamSplitter
public StreamSplitter(OutputStream stream1,
OutputStream stream2)
- Constructor
- Parameters:
stream1
- first streamstream2
- second stream
write
public void write(int b)
throws IOException
- Specified by:
write
in class OutputStream
- Throws:
IOException
write
public void write(byte[] b)
throws IOException
- Overrides:
write
in class OutputStream
- Throws:
IOException
write
public void write(byte[] b,
int o,
int l)
throws IOException
- Overrides:
write
in class OutputStream
- Throws:
IOException
Copyright © 2005-2009 Abstract Horizon. All Rights Reserved.