类 StreamPumper
java.lang.Object
com.sh.common.exec.StreamPumper
- 所有已实现的接口:
Runnable
Description:
Title:首亨软件 - CRM、TSS、ERP等信息化管理软件
-
构造器概要
构造器构造器说明StreamPumper(InputStream is, OutputStream os) Create a new stream pumper.StreamPumper(InputStream is, OutputStream os, boolean closeWhenExhausted) Create a new stream pumper.StreamPumper(InputStream is, OutputStream os, boolean closeWhenExhausted, int size) Create a new stream pumper. -
方法概要
-
构造器详细资料
-
StreamPumper
Create a new stream pumper.- 参数:
is- input stream to read data fromos- output stream to write data to.closeWhenExhausted- if true, the output stream will be closed when the input is exhausted.
-
StreamPumper
Create a new stream pumper.- 参数:
is- input stream to read data fromos- 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
Create a new stream pumper.- 参数:
is- input stream to read data fromos- 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. -
isFinished
public boolean isFinished()Tells whether the end of the stream has been reached.- 返回:
- true is the stream has been exhausted.
-
waitFor
This method blocks until the stream pumper finishes.- 抛出:
InterruptedException- InterruptedException- 另请参阅:
-