类 PumpStreamHandler
java.lang.Object
com.sh.common.exec.PumpStreamHandler
- 所有已实现的接口:
ExecuteStreamHandler
Description:
Title:首亨软件 - CRM、TSS、ERP等信息化管理软件
-
构造器概要
构造器构造器说明Construct a newPumpStreamHandler.PumpStreamHandler(OutputStream outAndErr) Construct a newPumpStreamHandler.PumpStreamHandler(OutputStream out, OutputStream err) Construct a newPumpStreamHandler.PumpStreamHandler(OutputStream out, OutputStream err, InputStream input) Construct a newPumpStreamHandler. -
方法概要
修饰符和类型方法说明protected voidCreate the pump to handle error output.protected voidCreate the pump to handle process output.protected ThreadcreatePump(InputStream is, OutputStream os) Creates a stream pumper to copy the given input stream to the given output stream.protected ThreadcreatePump(InputStream is, OutputStream os, boolean closeWhenExhausted) Creates a stream pumper to copy the given input stream to the given output stream.protected OutputStreamgetErr()Get the error stream.protected OutputStreamgetOut()Get the output stream.voidSet theInputStreamfrom which to read the standard error of the process.voidSet theOutputStreamby means of which input can be sent to the process.voidSet theInputStreamfrom which to read the standard output of the process.voidstart()Start theThreads.voidstop()Stop pumping the streams.
-
构造器详细资料
-
PumpStreamHandler
public PumpStreamHandler()Construct a newPumpStreamHandler. -
PumpStreamHandler
Construct a newPumpStreamHandler.- 参数:
outAndErr- the output/errorOutputStream.
-
PumpStreamHandler
Construct a newPumpStreamHandler.- 参数:
out- the outputOutputStream.err- the errorOutputStream.
-
PumpStreamHandler
Construct a newPumpStreamHandler.- 参数:
out- the outputOutputStream.err- the errorOutputStream.input- the inputInputStream.
-
-
方法详细资料
-
setProcessOutputStream
Set theInputStreamfrom which to read the standard output of the process.- 指定者:
setProcessOutputStream在接口中ExecuteStreamHandler- 参数:
is- theInputStream.
-
setProcessErrorStream
Set theInputStreamfrom which to read the standard error of the process.- 指定者:
setProcessErrorStream在接口中ExecuteStreamHandler- 参数:
is- theInputStream.
-
setProcessInputStream
Set theOutputStreamby means of which input can be sent to the process.- 指定者:
setProcessInputStream在接口中ExecuteStreamHandler- 参数:
os- theOutputStream.
-
start
public void start()Start theThreads.- 指定者:
start在接口中ExecuteStreamHandler
-
stop
public void stop()Stop pumping the streams.- 指定者:
stop在接口中ExecuteStreamHandler
-
getErr
Get the error stream.- 返回:
OutputStream.
-
getOut
Get the output stream.- 返回:
OutputStream.
-
createProcessOutputPump
Create the pump to handle process output.- 参数:
is- theInputStream.os- theOutputStream.
-
createProcessErrorPump
Create the pump to handle error output.- 参数:
is- theInputStream.os- theOutputStream.
-
createPump
Creates a stream pumper to copy the given input stream to the given output stream.- 参数:
is- the input stream to copy fromos- the output stream to copy into- 返回:
- the stream pumper thread
-
createPump
Creates a stream pumper to copy the given input stream to the given output stream.- 参数:
is- the input stream to copy fromos- the output stream to copy intocloseWhenExhausted- close the output stream when the input stream is exhausted- 返回:
- the stream pumper thread
-