java.lang.Object
com.arranger.jarl.util.ProcessStreamMonitor.StreamPumper
- All Implemented Interfaces:
- java.lang.Runnable
- Enclosing class:
- ProcessStreamMonitor
- protected static class ProcessStreamMonitor.StreamPumper
- extends java.lang.Object
- implements java.lang.Runnable
|
Method Summary |
boolean |
isFinished()
Tells whether the end of the stream has been reached. |
void |
run()
Copies data from the input stream to the output stream. |
void |
waitFor()
This method blocks until the stream pumper finishes. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SLEEP
private static final int SLEEP
- See Also:
- Constant Field Values
SIZE
private static final int SIZE
- See Also:
- Constant Field Values
is
private java.io.InputStream is
os
private java.io.OutputStream os
finished
private boolean finished
ProcessStreamMonitor.StreamPumper
public ProcessStreamMonitor.StreamPumper(java.io.InputStream is,
java.io.OutputStream os)
- Create a new stream pumper.
run
public void run()
- Copies data from the input stream to the output stream.
Terminates as soon as the input stream is closed or an error occurs.
- Specified by:
run in interface java.lang.Runnable
isFinished
public boolean isFinished()
- Tells whether the end of the stream has been reached.
waitFor
public void waitFor()
throws java.lang.InterruptedException
- This method blocks until the stream pumper finishes.