|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.tools.ant.taskdefs.PumpStreamHandler
Copies standard output and error of subprocesses to standard output and error of the parent process.
Constructor Summary | |
PumpStreamHandler()
Construct a new PumpStreamHandler . |
|
PumpStreamHandler(java.io.OutputStream outAndErr)
Construct a new PumpStreamHandler . |
|
PumpStreamHandler(java.io.OutputStream out,
java.io.OutputStream err)
Construct a new PumpStreamHandler . |
|
PumpStreamHandler(java.io.OutputStream out,
java.io.OutputStream err,
java.io.InputStream input)
Construct a new PumpStreamHandler . |
Method Summary | |
protected void |
createProcessErrorPump(java.io.InputStream is,
java.io.OutputStream os)
Create the pump to handle error output. |
protected void |
createProcessOutputPump(java.io.InputStream is,
java.io.OutputStream os)
Create the pump to handle process output. |
protected java.lang.Thread |
createPump(java.io.InputStream is,
java.io.OutputStream os)
Creates a stream pumper to copy the given input stream to the given output stream. |
protected java.lang.Thread |
createPump(java.io.InputStream is,
java.io.OutputStream os,
boolean closeWhenExhausted)
Creates a stream pumper to copy the given input stream to the given output stream. |
protected java.io.OutputStream |
getErr()
Get the error stream. |
protected java.io.OutputStream |
getOut()
Get the output stream. |
void |
setProcessErrorStream(java.io.InputStream is)
Set the InputStream from which to read the
standard error of the process. |
void |
setProcessInputStream(java.io.OutputStream os)
Set the OutputStream by means of which
input can be sent to the process. |
void |
setProcessOutputStream(java.io.InputStream is)
Set the InputStream from which to read the
standard output of the process. |
void |
start()
Start the Thread s. |
void |
stop()
Stop pumping the streams. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public PumpStreamHandler(java.io.OutputStream out, java.io.OutputStream err, java.io.InputStream input)
PumpStreamHandler
.
out
- the output OutputStream
.err
- the error OutputStream
.input
- the input InputStream
.public PumpStreamHandler(java.io.OutputStream out, java.io.OutputStream err)
PumpStreamHandler
.
out
- the output OutputStream
.err
- the error OutputStream
.public PumpStreamHandler(java.io.OutputStream outAndErr)
PumpStreamHandler
.
outAndErr
- the output/error OutputStream
.public PumpStreamHandler()
PumpStreamHandler
.
Method Detail |
public void setProcessOutputStream(java.io.InputStream is)
InputStream
from which to read the
standard output of the process.
setProcessOutputStream
in interface ExecuteStreamHandler
is
- the InputStream
.public void setProcessErrorStream(java.io.InputStream is)
InputStream
from which to read the
standard error of the process.
setProcessErrorStream
in interface ExecuteStreamHandler
is
- the InputStream
.public void setProcessInputStream(java.io.OutputStream os)
OutputStream
by means of which
input can be sent to the process.
setProcessInputStream
in interface ExecuteStreamHandler
os
- the OutputStream
.public void start()
Thread
s.
start
in interface ExecuteStreamHandler
public void stop()
stop
in interface ExecuteStreamHandler
protected java.io.OutputStream getErr()
OutputStream
.protected java.io.OutputStream getOut()
OutputStream
.protected void createProcessOutputPump(java.io.InputStream is, java.io.OutputStream os)
is
- the InputStream
.os
- the OutputStream
.protected void createProcessErrorPump(java.io.InputStream is, java.io.OutputStream os)
is
- the InputStream
.os
- the OutputStream
.protected java.lang.Thread createPump(java.io.InputStream is, java.io.OutputStream os)
protected java.lang.Thread createPump(java.io.InputStream is, java.io.OutputStream os, boolean closeWhenExhausted)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |