|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.io.OutputStream
com.pmease.quickbuild.execution.LineConsumer
public abstract class LineConsumer
heavily inspired from LogOutputStream this stream class calls back the P4Handler on each line of stdout or stderr read
| Nested Class Summary | |
|---|---|
static class |
LineConsumer.DebugLogger
|
static class |
LineConsumer.ErrorLogger
|
static class |
LineConsumer.InfoLogger
|
static class |
LineConsumer.NoOp
|
static class |
LineConsumer.TraceLogger
|
static class |
LineConsumer.WarnLogger
|
| Constructor Summary | |
|---|---|
LineConsumer()
|
|
LineConsumer(java.lang.String encoding)
|
|
| Method Summary | |
|---|---|
void |
close()
Writes all remaining |
abstract void |
consume(java.lang.String line)
Sub class must implement this method to handle a line of output |
void |
flush()
|
java.lang.String |
getEncoding()
|
protected void |
processBuffer()
Converts the buffer to a string and sends it to processLine |
void |
write(int cc)
Write the data to the buffer and flush the buffer, if a line separator is detected. |
| Methods inherited from class java.io.OutputStream |
|---|
write, write |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public LineConsumer(java.lang.String encoding)
public LineConsumer()
| Method Detail |
|---|
public java.lang.String getEncoding()
public void write(int cc)
throws java.io.IOException
write in class java.io.OutputStreamcc - data to log (byte).
java.io.IOException - IOException if an I/O error occurs. In particular,
an IOException may be thrown if the
output stream has been closed.protected void processBuffer()
processLine
public abstract void consume(java.lang.String line)
line -
public void flush()
throws java.io.IOException
flush in interface java.io.Flushableflush in class java.io.OutputStreamjava.io.IOException
public void close()
throws java.io.IOException
close in interface java.io.Closeableclose in class java.io.OutputStreamjava.io.IOException - if an I/O error occurs.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||