org.apache.tools.ant.taskdefs.ExecuteStreamHandlerpublic 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.ExecuteStreamHandleris - input stream to read from the error stream from the
subprocessjava.io.IOExceptionpublic void setProcessInputStream(java.io.OutputStream os)
throws java.io.IOException
setProcessInputStream in interface org.apache.tools.ant.taskdefs.ExecuteStreamHandleros - output stream to write to the standard input stream of the
subprocessjava.io.IOExceptionpublic void setProcessOutputStream(java.io.InputStream is)
throws java.io.IOException
setProcessOutputStream in interface org.apache.tools.ant.taskdefs.ExecuteStreamHandleris - input stream to read from the error stream from the
subprocessjava.io.IOExceptionpublic void start()
throws java.io.IOException
start in interface org.apache.tools.ant.taskdefs.ExecuteStreamHandlerjava.io.IOExceptionpublic void stop()
stop in interface org.apache.tools.ant.taskdefs.ExecuteStreamHandlerCopyright ? 2001-2018 Ant-Contrib project. All Rights Reserved.