org.apache.anteater.util
Class TeeOutputStream
java.lang.Object
|
+--java.io.OutputStream
|
+--org.apache.anteater.util.TeeOutputStream
- public class TeeOutputStream
- extends OutputStream
This class behaves just like an OutputStream
, but it
writes the output into two output streams.
This class is used to print the generated message both to a pipe
stream and to the standard output, when the debug
option is set. See the source code for HttpRequest
to see an example of how this
is used.
- Since:
- September 29, 2001
- Version:
- $Revision: 1.3 $ $Date: 2002/01/14 02:28:49 $
- Author:
- Ovidiu Predescu
- See Also:
HttpRequest
Method Summary |
void |
close()
|
void |
flush()
|
void |
write(byte[] b)
|
void |
write(byte[] b,
int offset,
int len)
|
void |
write(int value)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TeeOutputStream
public TeeOutputStream(OutputStream os1,
OutputStream os2)
TeeOutputStream
public TeeOutputStream(OutputStream[] streams)
write
public void write(int value)
throws IOException
- Specified by:
write
in class OutputStream
IOException
write
public void write(byte[] b)
throws IOException
- Overrides:
write
in class OutputStream
IOException
write
public void write(byte[] b,
int offset,
int len)
throws IOException
- Overrides:
write
in class OutputStream
IOException
flush
public void flush()
throws IOException
- Overrides:
flush
in class OutputStream
IOException
close
public void close()
throws IOException
- Overrides:
close
in class OutputStream
IOException
Ant Functional Tester -- see Project home page for details