类 StreamPumper

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

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

    • StreamPumper

      public StreamPumper(InputStream is, OutputStream os, boolean closeWhenExhausted)
      Create a new stream pumper.
      参数:
      is - input stream to read data from
      os - output stream to write data to.
      closeWhenExhausted - if true, the output stream will be closed when the input is exhausted.
    • StreamPumper

      public StreamPumper(InputStream is, OutputStream os, boolean closeWhenExhausted, int size)
      Create a new stream pumper.
      参数:
      is - input stream to read data from
      os - output stream to write data to.
      closeWhenExhausted - if true, the output stream will be closed when the input is exhausted.
      size - the size of the internal buffer for copying the streams
    • StreamPumper

      public StreamPumper(InputStream is, OutputStream os)
      Create a new stream pumper.
      参数:
      is - input stream to read data from
      os - output stream to write data to.
  • 方法详细资料

    • run

      public void run()
      Copies data from the input stream to the output stream. Terminates as soon as the input stream is closed or an error occurs.
      指定者:
      run 在接口中 Runnable
    • isFinished

      public boolean isFinished()
      Tells whether the end of the stream has been reached.
      返回:
      true is the stream has been exhausted.
    • waitFor

      public void waitFor() throws InterruptedException
      This method blocks until the stream pumper finishes.
      抛出:
      InterruptedException - InterruptedException
      另请参阅: