org.apache.tools.ant
public class DemuxOutputStream extends OutputStream
Since: 1.4
Constructor Summary | |
---|---|
DemuxOutputStream(Project project, boolean isErrorStream)
Creates a new instance of this class.
|
Method Summary | |
---|---|
void | close()
Equivalent to flushing the stream.
|
void | flush()
Writes all remaining data in the buffer associated
with the current thread to the project.
|
protected void | processBuffer(ByteArrayOutputStream buffer)
Converts the buffer to a string and sends it to the project.
|
protected void | processFlush(ByteArrayOutputStream buffer)
Converts the buffer to a string and sends it to the project.
|
void | write(int cc)
Writes the data to the buffer and flushes the buffer if a line
separator is detected or if the buffer has reached its maximum size.
|
void | write(byte[] b, int off, int len)
Write a block of characters to the output stream
|
Parameters: project The project instance for which output is being
demultiplexed. Must not be null
. isErrorStream true
if this is the error string,
otherwise a normal output stream. This is
passed to the project so it knows
which stream it is receiving.
Throws: IOException if there is a problem closing the stream.
See Also: DemuxOutputStream
Throws: IOException if there is a problem flushing the stream.
Parameters: buffer the ByteArrayOutputStream used to collect the output until a line separator is seen.
See Also: Project
Parameters: buffer the ByteArrayOutputStream used to collect the output until a line separator is seen.
See Also: Project
Parameters: cc data to log (byte).
Throws: IOException if the data cannot be written to the stream
Parameters: b the array containing the data off the offset into the array where data starts len the length of block
Throws: IOException if the data cannot be written into the stream.