public class PumpStreamHandler extends Object
| Constructor and Description |
|---|
PumpStreamHandler(InputStream in,
OutputStream out,
OutputStream err) |
PumpStreamHandler(InputStream in,
OutputStream out,
OutputStream err,
String name) |
PumpStreamHandler(OutputStream outAndErr) |
PumpStreamHandler(OutputStream out,
OutputStream err) |
| Modifier and Type | Method and Description |
|---|---|
void |
attach(Process p)
Attach to a child streams from the given process.
|
protected void |
createChildErrorPump(InputStream in,
OutputStream out)
Create the pump to handle error output.
|
protected void |
createChildOutputPump(InputStream in,
OutputStream out)
Create the pump to handle child output.
|
protected StreamPumper |
createInputPump(InputStream in,
OutputStream out,
boolean closeWhenExhausted)
Creates a stream pumper to copy the given input stream to the
given output stream.
|
protected StreamPumper |
createPump(InputStream in,
OutputStream out)
Creates a stream pumper to copy the given input stream to the given output stream.
|
protected StreamPumper |
createPump(InputStream in,
OutputStream out,
boolean closeWhenExhausted)
Creates a stream pumper to copy the given input stream to the
given output stream.
|
StreamPumper |
getErrorPump() |
StreamPumper |
getOutputPump() |
void |
setChildErrorStream(InputStream in)
Set the input stream from which to read the standard error of the child.
|
void |
setChildInputStream(OutputStream out)
Set the output stream by means of which input can be sent to the child.
|
void |
setChildOutputStream(InputStream in)
Set the input stream from which to read the standard output of the child.
|
void |
start()
Start pumping the streams.
|
void |
stop()
Stop pumping the streams.
|
public PumpStreamHandler(InputStream in, OutputStream out, OutputStream err, String name)
public PumpStreamHandler(InputStream in, OutputStream out, OutputStream err)
public PumpStreamHandler(OutputStream out, OutputStream err)
public PumpStreamHandler(OutputStream outAndErr)
public void setChildOutputStream(InputStream in)
public void setChildErrorStream(InputStream in)
public void setChildInputStream(OutputStream out)
public void attach(Process p)
p - The process to attach to.public void start()
public void stop()
protected void createChildOutputPump(InputStream in, OutputStream out)
protected void createChildErrorPump(InputStream in, OutputStream out)
protected StreamPumper createPump(InputStream in, OutputStream out)
protected StreamPumper createPump(InputStream in, OutputStream out, boolean closeWhenExhausted)
in - The input stream to copy from.out - The output stream to copy to.closeWhenExhausted - If true close the inputstream.protected StreamPumper createInputPump(InputStream in, OutputStream out, boolean closeWhenExhausted)
public StreamPumper getOutputPump()
public StreamPumper getErrorPump()
Copyright © 2007–2014 The Apache Software Foundation. All rights reserved.