public class CaptureStreamHandler extends Object implements org.apache.tools.ant.taskdefs.ExecuteStreamHandler
| Constructor and Description |
|---|
CaptureStreamHandler() |
| Modifier and Type | Method and Description |
|---|---|
String[] |
getOutput() |
static String[] |
run(String[] cmdline)
Runs an executable and captures the output in a String array
|
void |
setProcessErrorStream(InputStream is)
Install a handler for the error stream of the subprocess.
|
void |
setProcessInputStream(OutputStream os)
Install a handler for the input stream of the subprocess.
|
void |
setProcessOutputStream(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 String[] run(String[] cmdline)
cmdline - command line argumentspublic String[] getOutput()
public void setProcessErrorStream(InputStream is) throws IOException
setProcessErrorStream in interface org.apache.tools.ant.taskdefs.ExecuteStreamHandleris - input stream to read from the error stream from the
subprocessIOExceptionpublic void setProcessInputStream(OutputStream os) throws IOException
setProcessInputStream in interface org.apache.tools.ant.taskdefs.ExecuteStreamHandleros - output stream to write to the standard input stream of the
subprocessIOExceptionpublic void setProcessOutputStream(InputStream is) throws IOException
setProcessOutputStream in interface org.apache.tools.ant.taskdefs.ExecuteStreamHandleris - input stream to read from the error stream from the
subprocessIOExceptionpublic void start()
throws IOException
start in interface org.apache.tools.ant.taskdefs.ExecuteStreamHandlerIOExceptionpublic void stop()
stop in interface org.apache.tools.ant.taskdefs.ExecuteStreamHandlerCopyright © 2001–2025 Ant-Contrib Project. All rights reserved.