Package org.apache.commons.exec
Class InputStreamPumper
- java.lang.Object
-
- org.apache.commons.exec.InputStreamPumper
-
- All Implemented Interfaces:
java.lang.Runnable
public class InputStreamPumper extends java.lang.Object implements java.lang.RunnableCopies all data from aSystem.inputstream to an output stream of the executed process.
-
-
Field Summary
Fields Modifier and Type Field Description private java.io.InputStreamisThe input stream to pump from.private java.io.OutputStreamosThe output stream to pmp into.static intSLEEPING_TIMESleep time in milliseconds.private booleanstopFlag to stop the stream pumping.
-
Constructor Summary
Constructors Constructor Description InputStreamPumper(java.io.InputStream is, java.io.OutputStream os)Create a new stream pumper.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidrun()Copies data from the input stream to the output stream.voidstopProcessing()Requests processing to stop.
-
-
-
Field Detail
-
SLEEPING_TIME
public static final int SLEEPING_TIME
Sleep time in milliseconds.- See Also:
- Constant Field Values
-
is
private final java.io.InputStream is
The input stream to pump from.
-
os
private final java.io.OutputStream os
The output stream to pmp into.
-
stop
private volatile boolean stop
Flag to stop the stream pumping.
-
-