public class PumpStreamHandler extends java.lang.Object implements ExecuteStreamHandler
| Constructor and Description |
|---|
PumpStreamHandler()
Construct a new
PumpStreamHandler. |
PumpStreamHandler(java.io.OutputStream outAndErr)
Construct a new
PumpStreamHandler. |
PumpStreamHandler(java.io.OutputStream out,
java.io.OutputStream err)
Construct a new
PumpStreamHandler. |
PumpStreamHandler(java.io.OutputStream out,
java.io.OutputStream err,
java.io.InputStream input)
Construct a new
PumpStreamHandler. |
| Modifier and Type | Method and Description |
|---|---|
void |
setProcessErrorStream(java.io.InputStream is)
Set the
InputStream from which to read the standard error
of the process. |
void |
setProcessInputStream(java.io.OutputStream os)
Set the
OutputStream by means of which input can be sent
to the process. |
void |
setProcessOutputStream(java.io.InputStream is)
Set the
InputStream from which to read the standard output
of the process. |
void |
setStopTimeout(long timeout)
Set maximum time to wait until output streams are exchausted
when
stop() was called. |
void |
start()
Start the
Threads. |
void |
stop()
Stop pumping the streams.
|
public PumpStreamHandler()
PumpStreamHandler.public PumpStreamHandler(java.io.OutputStream outAndErr)
PumpStreamHandler.outAndErr - the output/error OutputStream.public PumpStreamHandler(java.io.OutputStream out,
java.io.OutputStream err)
PumpStreamHandler.out - the output OutputStream.err - the error OutputStream.public PumpStreamHandler(java.io.OutputStream out,
java.io.OutputStream err,
java.io.InputStream input)
PumpStreamHandler.out - the output OutputStream.err - the error OutputStream.input - the input InputStream.public void setStopTimeout(long timeout)
stop() was called.timeout - timeout in milliseconds or zero to wait forever (default)public void setProcessOutputStream(java.io.InputStream is)
InputStream from which to read the standard output
of the process.setProcessOutputStream in interface ExecuteStreamHandleris - the InputStream.public void setProcessErrorStream(java.io.InputStream is)
InputStream from which to read the standard error
of the process.setProcessErrorStream in interface ExecuteStreamHandleris - the InputStream.public void setProcessInputStream(java.io.OutputStream os)
OutputStream by means of which input can be sent
to the process.setProcessInputStream in interface ExecuteStreamHandleros - the OutputStream.public void start()
Threads.start in interface ExecuteStreamHandlerpublic void stop()
throws java.io.IOException
stop in interface ExecuteStreamHandlerjava.io.IOException - thrown when an I/O exception occurs.Copyright © 2010 - 2023 Adobe. All Rights Reserved