to.etc.util
Class TeeStream
java.lang.Object
java.io.OutputStream
to.etc.util.TeeStream
- All Implemented Interfaces:
- java.io.Closeable, java.io.Flushable
public class TeeStream
- extends java.io.OutputStream
An outputstream which duplicates all contents written to it to two
other output streams.
- Author:
- Frits Jalvingh
Created on Nov 25, 2010
Constructor Summary |
TeeStream(java.io.OutputStream a,
java.io.OutputStream b)
|
Method Summary |
void |
close()
|
void |
flush()
|
void |
write(byte[] parm1)
|
void |
write(byte[] parm1,
int parm2,
int parm3)
|
void |
write(int b)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TeeStream
public TeeStream(java.io.OutputStream a,
java.io.OutputStream b)
write
public void write(byte[] parm1)
throws java.io.IOException
- Overrides:
write
in class java.io.OutputStream
- Throws:
java.io.IOException
flush
public void flush()
throws java.io.IOException
- 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
- Specified by:
write
in class java.io.OutputStream
- Throws:
java.io.IOException
write
public void write(byte[] parm1,
int parm2,
int parm3)
throws java.io.IOException
- Overrides:
write
in class java.io.OutputStream
- Throws:
java.io.IOException
close
public void close()
throws java.io.IOException
- Specified by:
close
in interface java.io.Closeable
- Overrides:
close
in class java.io.OutputStream
- Throws:
java.io.IOException