|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.io.OutputStream | +--org.apache.tools.ant.taskdefs.optional.perforce.P4OutputStream
heavily inspired from LogOutputStream this stream class calls back the P4Handler on each line of stdout or stderr read
Constructor Summary | |
P4OutputStream(P4Handler handler)
creates a new P4OutputStream for a P4Handler |
Method Summary | |
void |
close()
Writes all remaining |
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 |
flush, write, write |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public P4OutputStream(P4Handler handler)
handler
- the handler which will process the streamsMethod Detail |
public void write(int cc) throws java.io.IOException
write
in class java.io.OutputStream
cc
- 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 void close() throws java.io.IOException
close
in class java.io.OutputStream
java.io.IOException
- if an I/O error occurs.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |