| 
 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.io.OutputStream
org.apache.tools.ant.util.LineOrientedOutputStream
org.apache.tools.ant.util.LineOrientedOutputStreamRedirector
public class LineOrientedOutputStreamRedirector
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.
| Constructor Summary | |
|---|---|
| LineOrientedOutputStreamRedirector(java.io.OutputStream stream) | |
| Method Summary | |
|---|---|
|  void | close()Writes all remaining | 
|  void | flush()Flush this log stream | 
| protected  void | processLine(byte[] b)Processes a line. | 
| protected  void | processLine(java.lang.String line)Processes a line. | 
| Methods inherited from class org.apache.tools.ant.util.LineOrientedOutputStream | 
|---|
| processBuffer, write, write | 
| Methods inherited from class java.io.OutputStream | 
|---|
| write | 
| Methods inherited from class java.lang.Object | 
|---|
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Constructor Detail | 
|---|
public LineOrientedOutputStreamRedirector(java.io.OutputStream stream)
| Method Detail | 
|---|
protected void processLine(byte[] b)
                    throws java.io.IOException
LineOrientedOutputStreamThis 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.
processLine in class LineOrientedOutputStreamb - the line to log.
java.io.IOException - if there is an error.
protected void processLine(java.lang.String line)
                    throws java.io.IOException
LineOrientedOutputStream
processLine in class LineOrientedOutputStreamline - the line to log.
java.io.IOException - if there is an error.
public void close()
           throws java.io.IOException
LineOrientedOutputStream
close in interface java.io.Closeableclose in class LineOrientedOutputStreamjava.io.IOException - if there is an error.
public void flush()
           throws java.io.IOException
LineOrientedOutputStream
flush in interface java.io.Flushableflush in class LineOrientedOutputStreamjava.io.IOException - if there is an error.| 
 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||