| Modifier and Type | Class and Description |
|---|---|
| protected static class | PumpStreamHandler.
Specialized subclass that allows access to the running StreamPumper. |
| Modifier and Type | Field and Description |
|---|---|
| private OutputStream | |
| private Thread | |
| private InputStream | |
| private Thread | |
| private static final long | |
| private final boolean | |
| private OutputStream | |
| private Thread |
| Access | Constructor and Description |
|---|---|
| public | PumpStreamHandler(OutputStream
the output out, OutputStream OutputStream, must not be null.the error err, InputStream OutputStream, must not be null.the input input, boolean InputStream.set it to nonBlockingRead)true if the input should be
read with simulated non blocking IO.Construct a new |
| public | PumpStreamHandler(OutputStream
the output out, OutputStream OutputStream, must not be null.the error err, InputStream OutputStream, must not be null.the input input)InputStream.Construct a new |
| public | PumpStreamHandler(OutputStream
the output out, OutputStream OutputStream, must not be null.the error err)OutputStream, must not be null.Construct a new |
| public | PumpStreamHandler(OutputStream
the output/error outAndErr)OutputStream, must not be null.Construct a new |
| public |
| Modifier and Type | Method and Description |
|---|---|
| protected void | createProcessErrorPump(InputStream
the input stream to copy from. is, OutputStream the output stream to copy to. os)Create the pump to handle error output. |
| protected void | createProcessOutputPump(InputStream
the is, OutputStream InputStream.the os)OutputStream.Create the pump to handle process output. |
| protected Thread | Returns: a thread object that does the pumping.the input stream to copy from. is, OutputStream the output stream to copy to. os)Creates a stream pumper to copy the given input stream to the given output stream. |
| protected Thread | Returns: a thread object that does the pumping, subclasses should return an instance ofThreadWithPumper.the input stream to copy from. is, OutputStream the output stream to copy to. os, boolean if true close the inputstream. closeWhenExhausted)Creates a stream pumper to copy the given input stream to the given output stream. |
| protected Thread | Returns: a thread object that does the pumping, subclasses should return an instance ofThreadWithPumper.the input stream to copy from. is, OutputStream the output stream to copy to. os, boolean if true close the inputstream. closeWhenExhausted, boolean set it to nonBlockingIO)true to use simulated non
blocking IO.Creates a stream pumper to copy the given input stream to the given output stream. |
| protected final void | finish(Thread
Thread t)Waits for a thread to finish while trying to make it finish
quicker by stopping the pumper (if the thread is a |
| protected OutputStream | |
| protected OutputStream | |
| public void | setProcessErrorStream(InputStream
the is)InputStream.Implements org. InputStream from which to read the
standard error of the process.
|
| public void | setProcessInputStream(OutputStream
the os)OutputStream.Implements org. OutputStream by means of which
input can be sent to the process.
|
| public void | setProcessOutputStream(InputStream
the is)InputStream.Implements org. InputStream from which to read the
standard output of the process.
|
| public void | |
| private void | |
| public void |
| err | back to summary |
|---|---|
| private OutputStream err | |
| errorThread | back to summary |
|---|---|
| private Thread errorThread | |
| input | back to summary |
|---|---|
| private InputStream input | |
| inputThread | back to summary |
|---|---|
| private Thread inputThread | |
| JOIN_TIMEOUT | back to summary |
|---|---|
| private static final long JOIN_TIMEOUT | |
| nonBlockingRead | back to summary |
|---|---|
| private final boolean nonBlockingRead | |
| out | back to summary |
|---|---|
| private OutputStream out | |
| outputThread | back to summary |
|---|---|
| private Thread outputThread | |
| PumpStreamHandler | back to summary |
|---|---|
| public PumpStreamHandler(OutputStream out, OutputStream err, InputStream input, boolean nonBlockingRead) Construct a new
| |
| PumpStreamHandler | back to summary |
|---|---|
| public PumpStreamHandler(OutputStream out, OutputStream err, InputStream input) Construct a new
| |
| PumpStreamHandler | back to summary |
|---|---|
| public PumpStreamHandler(OutputStream out, OutputStream err) Construct a new
| |
| PumpStreamHandler | back to summary |
|---|---|
| public PumpStreamHandler(OutputStream outAndErr) Construct a new
| |
| PumpStreamHandler | back to summary |
|---|---|
| public PumpStreamHandler() Construct a new | |
| createProcessErrorPump | back to summary |
|---|---|
| protected void createProcessErrorPump(InputStream is, OutputStream os) Create the pump to handle error output.
| |
| createProcessOutputPump | back to summary |
|---|---|
| protected void createProcessOutputPump(InputStream is, OutputStream os) Create the pump to handle process output.
| |
| createPump | back to summary |
|---|---|
| protected Thread createPump(InputStream is, OutputStream os) Creates a stream pumper to copy the given input stream to the given output stream.
| |
| createPump | back to summary |
|---|---|
| protected Thread createPump(InputStream is, OutputStream os, boolean closeWhenExhausted) Creates a stream pumper to copy the given input stream to the given output stream.
| |
| createPump | back to summary |
|---|---|
| protected Thread createPump(InputStream is, OutputStream os, boolean closeWhenExhausted, boolean nonBlockingIO) Creates a stream pumper to copy the given input stream to the given output stream.
| |
| finish | back to summary |
|---|---|
| protected final void finish(Thread t) Waits for a thread to finish while trying to make it finish
quicker by stopping the pumper (if the thread is a
| |
| getErr | back to summary |
|---|---|
| protected OutputStream getErr() Get the error stream.
| |
| getOut | back to summary |
|---|---|
| protected OutputStream getOut() Get the output stream.
| |
| setProcessErrorStream | back to summary |
|---|---|
| public void setProcessErrorStream(InputStream is) Implements org. Set the
| |
| setProcessInputStream | back to summary |
|---|---|
| public void setProcessInputStream(OutputStream os) Implements org. Set the
| |
| setProcessOutputStream | back to summary |
|---|---|
| public void setProcessOutputStream(InputStream is) Implements org. Set the
| |
| start | back to summary |
|---|---|
| public void start() Implements org. Start the | |
| start | back to summary |
|---|---|
| private void start(Thread t) | |
| stop | back to summary |
|---|---|
| public void stop() Implements org. Stop pumping the streams. | |
| Modifier and Type | Field and Description |
|---|---|
| private final StreamPumper |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| protected StreamPumper |
| pumper | back to summary |
|---|---|
| private final StreamPumper pumper | |
| ThreadWithPumper | back to summary |
|---|---|
| public ThreadWithPumper(StreamPumper p) | |
| getPumper | back to summary |
|---|---|
| protected StreamPumper getPumper() | |