List of usage examples for org.apache.commons.exec InputStreamPumper InputStreamPumper
public InputStreamPumper(final InputStream is, final OutputStream os)
From source file:com.example.gridtest.MyPumpStreamHandler.java
/** * Creates a stream pumper to copy the given input stream to the given * output stream./*w ww . j av a 2 s. c o m*/ * * @param is the System.in input stream to copy from * @param os the output stream to copy into * @return the stream pumper thread */ private Thread createSystemInPump(InputStream is, OutputStream os) { inputStreamPumper = new InputStreamPumper(is, os); final Thread result = new Thread(inputStreamPumper); result.setDaemon(true); return result; }
From source file:maker.task.compile.ReplTestPumpStreamHandler.java
/** * Creates a stream pumper to copy the given input stream to the given * output stream./*w w w . j a v a2 s. c o m*/ * * @param is the System.in input stream to copy from * @param os the output stream to copy into * @return the stream pumper thread */ private Thread createSystemInPump(final InputStream is, final OutputStream os) { inputStreamPumper = new InputStreamPumper(is, os); final Thread result = new Thread(inputStreamPumper, "Exec Input Stream Pumper"); result.setDaemon(true); return result; }