类 PumpStreamHandler

java.lang.Object
com.sh.common.exec.PumpStreamHandler
所有已实现的接口:
ExecuteStreamHandler

public class PumpStreamHandler extends Object implements ExecuteStreamHandler
Description: Title:首亨软件 - CRM、TSS、ERP等信息化管理软件
  • 构造器详细资料

    • PumpStreamHandler

      public PumpStreamHandler()
      Construct a new PumpStreamHandler.
    • PumpStreamHandler

      public PumpStreamHandler(OutputStream outAndErr)
      Construct a new PumpStreamHandler.
      参数:
      outAndErr - the output/error OutputStream.
    • PumpStreamHandler

      public PumpStreamHandler(OutputStream out, OutputStream err)
      Construct a new PumpStreamHandler.
      参数:
      out - the output OutputStream.
      err - the error OutputStream.
    • PumpStreamHandler

      public PumpStreamHandler(OutputStream out, OutputStream err, InputStream input)
      Construct a new PumpStreamHandler.
      参数:
      out - the output OutputStream.
      err - the error OutputStream.
      input - the input InputStream.
  • 方法详细资料

    • setProcessOutputStream

      public void setProcessOutputStream(InputStream is)
      Set the InputStream from which to read the standard output of the process.
      指定者:
      setProcessOutputStream 在接口中 ExecuteStreamHandler
      参数:
      is - the InputStream.
    • setProcessErrorStream

      public void setProcessErrorStream(InputStream is)
      Set the InputStream from which to read the standard error of the process.
      指定者:
      setProcessErrorStream 在接口中 ExecuteStreamHandler
      参数:
      is - the InputStream.
    • setProcessInputStream

      public void setProcessInputStream(OutputStream os)
      Set the OutputStream by means of which input can be sent to the process.
      指定者:
      setProcessInputStream 在接口中 ExecuteStreamHandler
      参数:
      os - the OutputStream.
    • start

      public void start()
      Start the Threads.
      指定者:
      start 在接口中 ExecuteStreamHandler
    • stop

      public void stop()
      Stop pumping the streams.
      指定者:
      stop 在接口中 ExecuteStreamHandler
    • getErr

      protected OutputStream getErr()
      Get the error stream.
      返回:
      OutputStream.
    • getOut

      protected OutputStream getOut()
      Get the output stream.
      返回:
      OutputStream.
    • createProcessOutputPump

      protected void createProcessOutputPump(InputStream is, OutputStream os)
      Create the pump to handle process output.
      参数:
      is - the InputStream.
      os - the OutputStream.
    • createProcessErrorPump

      protected void createProcessErrorPump(InputStream is, OutputStream os)
      Create the pump to handle error output.
      参数:
      is - the InputStream.
      os - the OutputStream.
    • createPump

      protected Thread createPump(InputStream is, OutputStream os)
      Creates a stream pumper to copy the given input stream to the given output stream.
      参数:
      is - the input stream to copy from
      os - the output stream to copy into
      返回:
      the stream pumper thread
    • createPump

      protected Thread createPump(InputStream is, OutputStream os, boolean closeWhenExhausted)
      Creates a stream pumper to copy the given input stream to the given output stream.
      参数:
      is - the input stream to copy from
      os - the output stream to copy into
      closeWhenExhausted - close the output stream when the input stream is exhausted
      返回:
      the stream pumper thread