Top Description Fields Constructors Methods
org.apache.tools.ant.util

public Class TeeOutputStream

extends OutputStream
Class Inheritance
Imports
java.io.IOException, .OutputStream

A simple T-piece to replicate an output stream into two separate streams

Field Summary

Modifier and TypeField and Description
private OutputStream
private OutputStream

Constructor Summary

AccessConstructor and Description
public
TeeOutputStream(OutputStream
one of the output streams.
left
,
OutputStream
the other output stream.
right
)

Constructor for TeeOutputStream.

Method Summary

Modifier and TypeMethod and Description
public void
close()

Overrides java.io.OutputStream.close.

Implements java.io.Closeable.close.

Close both output streams.
public void
flush()

Overrides java.io.OutputStream.flush.

Implements java.io.Flushable.flush.

Flush both output streams.
public void
write(byte[]
an array of bytes.
b
)

Overrides java.io.OutputStream.write.

Write a byte array to both output streams.
public void
write(byte[]
the data.
b
,
int
the start offset in the data.
off
,
int
the number of bytes to write.
len
)

Overrides java.io.OutputStream.write.

Write a byte array to both output streams.
public void
write(int
the byte to write.
b
)

Implements abstract java.io.OutputStream.write.

Write a byte to both output streams.
Inherited from java.io.OutputStream:
nullOutputStream

Field Detail

leftback to summary
private OutputStream left

Constructor Detail

TeeOutputStreamback to summary
public TeeOutputStream(OutputStream left, OutputStream right)

Constructor for TeeOutputStream.

Parameters
left:OutputStream

one of the output streams.

right:OutputStream

the other output stream.

Method Detail

closeback to summary
public void close() throws IOException

Overrides java.io.OutputStream.close.

Implements java.io.Closeable.close.

Close both output streams.

Annotations
@Override
Exceptions
IOException:
on error.
flushback to summary
public void flush() throws IOException

Overrides java.io.OutputStream.flush.

Implements java.io.Flushable.flush.

Flush both output streams.

Annotations
@Override
Exceptions
IOException:
on error
writeback to summary
public void write(byte[] b) throws IOException

Overrides java.io.OutputStream.write.

Write a byte array to both output streams.

Parameters
b:byte[]

an array of bytes.

Annotations
@Override
Exceptions
IOException:
on error.
writeback to summary
public void write(byte[] b, int off, int len) throws IOException

Overrides java.io.OutputStream.write.

Write a byte array to both output streams.

Parameters
b:byte[]

the data.

off:int

the start offset in the data.

len:int

the number of bytes to write.

Annotations
@Override
Exceptions
IOException:
on error.
writeback to summary
public void write(int b) throws IOException

Implements abstract java.io.OutputStream.write.

Write a byte to both output streams.

Parameters
b:int

the byte to write.

Annotations
@Override
Exceptions
IOException:
on error.