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

public Class LineOrientedOutputStreamRedirector

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

Output stream which buffer and redirect a stream line by line.

If the source stream doesn't end with a end of line, one will be added. This is particularly useful in combination with the OutputStreamFunneler so each funneled stream get its line.

Since
Ant 1.8.3

Field Summary

Modifier and TypeField and Description
private OutputStream

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
public void
protected void
processLine(byte[]
the line to log.
b
)

Overrides org.apache.tools.ant.util.LineOrientedOutputStream.processLine.

Processes a line.
protected void
processLine(String
the line to log.
line
)

Implements abstract org.apache.tools.ant.util.LineOrientedOutputStream.processLine.

Processes a line.
Inherited from org.apache.tools.ant.util.LineOrientedOutputStream:
processBufferwritewrite

Field Detail

streamback to summary
private OutputStream stream

Constructor Detail

LineOrientedOutputStreamRedirectorback to summary
public LineOrientedOutputStreamRedirector(OutputStream stream)

Method Detail

closeback to summary
public void close() throws IOException

Overrides org.apache.tools.ant.util.LineOrientedOutputStream.close.

Implements java.io.Closeable.close.

Doc from org.apache.tools.ant.util.LineOrientedOutputStream.close.

Writes all remaining

Annotations
@Override
Exceptions
IOException:
if there is an error.
flushback to summary
public void flush() throws IOException

Overrides org.apache.tools.ant.util.LineOrientedOutputStream.flush.

Implements java.io.Flushable.flush.

Doc from org.apache.tools.ant.util.LineOrientedOutputStream.flush.

Flush this log stream

Annotations
@Override
Exceptions
IOException:
if there is an error.
processLineback to summary
protected void processLine(byte[] b) throws IOException

Overrides org.apache.tools.ant.util.LineOrientedOutputStream.processLine.

Doc from org.apache.tools.ant.util.LineOrientedOutputStream.processLine.

Processes a line.

This implementations invokes the string-arg version converting the byte array using the default encoding. Subclasses are encouraged to override this method (and provide a dummy implementation of the String-arg version) so they don't interfere with the encoding of the underlying stream.

Parameters
b:byte[]

the line to log.

Annotations
@Override
Exceptions
IOException:
if there is an error.
processLineback to summary
protected void processLine(String line) throws IOException

Implements abstract org.apache.tools.ant.util.LineOrientedOutputStream.processLine.

Doc from org.apache.tools.ant.util.LineOrientedOutputStream.processLine.

Processes a line.

Parameters
line:String

the line to log.

Annotations
@Override
Exceptions
IOException:
if there is an error.