org.apache.tools.ant.taskdefs.ExecuteStreamHandler
public class CaptureStreamHandler
extends java.lang.Object
implements org.apache.tools.ant.taskdefs.ExecuteStreamHandler
Constructor | Description |
---|---|
CaptureStreamHandler() |
Modifier and Type | Method | Description |
---|---|---|
java.lang.String[] |
getOutput() |
|
static java.lang.String[] |
run(java.lang.String[] cmdline) |
Runs an executable and captures the output in a String array
|
void |
setProcessErrorStream(java.io.InputStream is) |
Install a handler for the error stream of the subprocess.
|
void |
setProcessInputStream(java.io.OutputStream os) |
Install a handler for the input stream of the subprocess.
|
void |
setProcessOutputStream(java.io.InputStream is) |
Install a handler for the output stream of the subprocess.
|
void |
start() |
Start handling of the streams.
|
void |
stop() |
Stop handling of the streams - will not be restarted.
|
public static java.lang.String[] run(java.lang.String[] cmdline)
cmdline
- command line argumentspublic java.lang.String[] getOutput()
public void setProcessErrorStream(java.io.InputStream is) throws java.io.IOException
setProcessErrorStream
in interface org.apache.tools.ant.taskdefs.ExecuteStreamHandler
is
- input stream to read from the error stream from the
subprocessjava.io.IOException
public void setProcessInputStream(java.io.OutputStream os) throws java.io.IOException
setProcessInputStream
in interface org.apache.tools.ant.taskdefs.ExecuteStreamHandler
os
- output stream to write to the standard input stream of the
subprocessjava.io.IOException
public void setProcessOutputStream(java.io.InputStream is) throws java.io.IOException
setProcessOutputStream
in interface org.apache.tools.ant.taskdefs.ExecuteStreamHandler
is
- input stream to read from the error stream from the
subprocessjava.io.IOException
public void start() throws java.io.IOException
start
in interface org.apache.tools.ant.taskdefs.ExecuteStreamHandler
java.io.IOException
public void stop()
stop
in interface org.apache.tools.ant.taskdefs.ExecuteStreamHandler
Copyright ? 2001-2017 Ant-Contrib project. All Rights Reserved.