Package org.apache.tools.ant.util
Class LineOrientedOutputStreamRedirector
java.lang.Object
java.io.OutputStream
org.apache.tools.ant.util.LineOrientedOutputStream
org.apache.tools.ant.util.LineOrientedOutputStreamRedirector
- All Implemented Interfaces:
- Closeable,- Flushable,- AutoCloseable
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
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidclose()Writes all remainingvoidflush()Flush this log streamprotected voidprocessLine(byte[] b) Processes a line.protected voidprocessLine(String line) Processes a line.Methods inherited from class org.apache.tools.ant.util.LineOrientedOutputStreamprocessBuffer, write, writeMethods inherited from class java.io.OutputStreamnullOutputStream, write
- 
Constructor Details- 
LineOrientedOutputStreamRedirector
 
- 
- 
Method Details- 
processLineDescription copied from class:LineOrientedOutputStreamProcesses 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. - Overrides:
- processLinein class- LineOrientedOutputStream
- Parameters:
- b- the line to log.
- Throws:
- IOException- if there is an error.
 
- 
processLineDescription copied from class:LineOrientedOutputStreamProcesses a line.- Specified by:
- processLinein class- LineOrientedOutputStream
- Parameters:
- line- the line to log.
- Throws:
- IOException- if there is an error.
 
- 
closeDescription copied from class:LineOrientedOutputStreamWrites all remaining- Specified by:
- closein interface- AutoCloseable
- Specified by:
- closein interface- Closeable
- Overrides:
- closein class- LineOrientedOutputStream
- Throws:
- IOException- if there is an error.
 
- 
flushDescription copied from class:LineOrientedOutputStreamFlush this log stream- Specified by:
- flushin interface- Flushable
- Overrides:
- flushin class- LineOrientedOutputStream
- Throws:
- IOException- if there is an error.
 
 
-