|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.fife.rsta.ac.OutputCollector
public class OutputCollector
A class that eats the stdout or stderr of a running Process to prevent deadlock.
| Constructor Summary | |
|---|---|
OutputCollector(InputStream in)
Constructor. |
|
OutputCollector(InputStream in,
boolean collect)
Constructor. |
|
OutputCollector(InputStream in,
StringBuffer sb)
Constructor. |
|
| Method Summary | |
|---|---|
StringBuffer |
getOutput()
Returns the output collected from the stream. |
protected void |
handleLineRead(String line)
Called every time a line is read from the stream. |
void |
run()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public OutputCollector(InputStream in)
in - The input stream.
public OutputCollector(InputStream in,
StringBuffer sb)
in - The input stream.sb - The buffer in which to collect the output.
public OutputCollector(InputStream in,
boolean collect)
in - The input stream.collect - Whether to actually collect the output in a buffer.
If this is false, then getOutput() will
return null. This parameter can be used if you want
to eat, but ignore, stdout or stderr for a process.| Method Detail |
|---|
public StringBuffer getOutput()
protected void handleLineRead(String line)
throws IOException
line - The line read.
IOException - If an IO error occurs.public void run()
run in interface Runnable
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||