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)
Create a stream pumper to copy the given input stream to the
given output stream.
|
protected StreamPumper |
createPump(InputStream in,
OutputStream out)
Create a stream pumper to copy the given input stream to the given output stream.
|
protected StreamPumper |
createPump(InputStream in,
OutputStream out,
boolean closeWhenExhausted)
Create 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)
in - the the child output stream.public void setChildErrorStream(InputStream in)
in - set the child error stream.public void setChildInputStream(OutputStream out)
out - set the child output stream.public void attach(Process p)
p - The process to attach to.public void start()
public void stop()
protected void createChildOutputPump(InputStream in, OutputStream out)
in - the child input stream.out - the child output stream.protected void createChildErrorPump(InputStream in, OutputStream out)
in - the child input stream.out - the child output stream.protected StreamPumper createPump(InputStream in, OutputStream out)
in - the child input stream.out - the child output stream.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 input stream.protected StreamPumper createInputPump(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 input stream.public StreamPumper getOutputPump()
public StreamPumper getErrorPump()
Copyright © 2007–2019 The Apache Software Foundation. All rights reserved.