org.apache.tools.ant.taskdefs
Class PumpStreamHandler
java.lang.Object
org.apache.tools.ant.taskdefs.PumpStreamHandler
- ExecuteStreamHandler
public class PumpStreamHandler
extends java.lang.Object
Copies standard output and error of subprocesses to standard output and
error of the parent process.
protected void | createProcessErrorPump(InputStream is, OutputStream os) - Create the pump to handle error output.
|
protected void | createProcessOutputPump(InputStream is, OutputStream os) - Create the pump to handle process output.
|
protected Thread | createPump(InputStream is, OutputStream os) - Creates a stream pumper to copy the given input stream to the
given output stream.
|
protected Thread | createPump(InputStream is, OutputStream os, boolean closeWhenExhausted) - Creates a stream pumper to copy the given input stream to the
given output stream.
|
protected OutputStream | getErr() - Get the error stream.
|
protected OutputStream | getOut() - Get the output stream.
|
void | setProcessErrorStream(InputStream is) - Set the
InputStream from which to read the
standard error of the process.
|
void | setProcessInputStream(OutputStream os) - Set the
OutputStream by means of which
input can be sent to the process.
|
void | setProcessOutputStream(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.
|
PumpStreamHandler
public PumpStreamHandler()
Construct a new PumpStreamHandler
.
PumpStreamHandler
public PumpStreamHandler(OutputStream outAndErr)
Construct a new PumpStreamHandler
.
outAndErr
- the output/error OutputStream
.
PumpStreamHandler
public PumpStreamHandler(OutputStream out,
OutputStream err)
Construct a new PumpStreamHandler
.
out
- the output OutputStream
.err
- the error OutputStream
.
PumpStreamHandler
public PumpStreamHandler(OutputStream out,
OutputStream err,
InputStream input)
Construct a new PumpStreamHandler
.
out
- the output OutputStream
.err
- the error OutputStream
.input
- the input InputStream
.
createProcessErrorPump
protected void createProcessErrorPump(InputStream is,
OutputStream os)
Create the pump to handle error output.
is
- the InputStream
.os
- the OutputStream
.
createProcessOutputPump
protected void createProcessOutputPump(InputStream is,
OutputStream os)
Create the pump to handle process output.
is
- the InputStream
.os
- the OutputStream
.
createPump
protected Thread createPump(InputStream is,
OutputStream os)
Creates a stream pumper to copy the given input stream to the
given output stream.
createPump
protected Thread createPump(InputStream is,
OutputStream os,
boolean closeWhenExhausted)
Creates a stream pumper to copy the given input stream to the
given output stream.
getErr
protected OutputStream getErr()
Get the error stream.
getOut
protected OutputStream getOut()
Get the output stream.
Copyright B) 2000-2006 Apache Software Foundation. All Rights Reserved.