| java.lang.Object java.io.OutputStream org.apache.tools.ant.DemuxOutputStream
DemuxOutputStream | public class DemuxOutputStream extends OutputStream (Code) | | Logs content written by a thread and forwards the buffers onto the
project object which will forward the content to the appropriate
task.
since: 1.4 |
Constructor Summary | |
public | DemuxOutputStream(Project project, boolean isErrorStream) Creates a new instance of this class.
Parameters: project - The project instance for which output is beingdemultiplexed. |
Method Summary | |
public void | close() Equivalent to flushing the stream. | public 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. | public 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. | public void | write(byte[] b, int off, int len) |
DemuxOutputStream | public DemuxOutputStream(Project project, boolean isErrorStream)(Code) | | Creates a new instance of this class.
Parameters: project - The project instance for which output is beingdemultiplexed. Must not be null . Parameters: isErrorStream - true if this is the error string,otherwise a normal output stream. This ispassed to the project so it knowswhich stream it is receiving. |
flush | public void flush() throws IOException(Code) | | Writes all remaining data in the buffer associated
with the current thread to the project.
exception: IOException - if there is a problem flushing the stream. |
write | public void write(int cc) throws IOException(Code) | | 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.
Parameters: cc - data to log (byte). exception: IOException - if the data cannot be written to the stream |
write | public void write(byte[] b, int off, int len) throws IOException(Code) | | Write a block of characters to the output stream
Parameters: b - the array containing the data Parameters: off - the offset into the array where data starts Parameters: len - the length of block throws: IOException - if the data cannot be written into the stream. |
|
|