org.apache.tools.ant.util
Class TeeOutputStream
OutputStream
org.apache.tools.ant.util.TeeOutputStream
public class TeeOutputStream
extends OutputStream
A simple T-piece to replicate an output stream into two separate streams
TeeOutputStream(OutputStream left, OutputStream right) - Constructor for TeeOutputStream.
|
void | close() - Close both output streams.
|
void | flush() - Flush both output streams.
|
void | write(byte[] b) - Write a byte array to both output streams.
|
void | write(byte[] b, int off, int len) - Write a byte array to both output streams.
|
void | write(int b) - Write a byte to both output streams.
|
TeeOutputStream
public TeeOutputStream(OutputStream left,
OutputStream right)
Constructor for TeeOutputStream.
left
- one of the output streams.right
- the other output stream.
close
public void close()
throws IOException
Close both output streams.
flush
public void flush()
throws IOException
Flush both output streams.
write
public void write(byte[] b)
throws IOException
Write a byte array to both output streams.
b
- an array of bytes.
write
public void write(byte[] b,
int off,
int len)
throws IOException
Write a byte array to both output streams.
b
- the data.off
- the start offset in the data.len
- the number of bytes to write.
write
public void write(int b)
throws IOException
Write a byte to both output streams.
b
- the byte to write.
Copyright B) 2000-2005 Apache Software Foundation. All Rights Reserved.