net.sf.antcontrib.cpptasks.compiler
Class CaptureStreamHandler
java.lang.Object
net.sf.antcontrib.cpptasks.compiler.CaptureStreamHandler
- ExecuteStreamHandler
public class CaptureStreamHandler
extends java.lang.Object
implements ExecuteStreamHandler
Implements ExecuteStreamHandler to capture the output of a Execute to an
array of strings
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.
|
CaptureStreamHandler
public CaptureStreamHandler()
getOutput
public String[] getOutput()
run
public static String[] run(String[] cmdline)
Runs an executable and captures the output in a String array
cmdline
- command line arguments
setProcessErrorStream
public void setProcessErrorStream(InputStream is)
throws IOException
Install a handler for the error stream of the subprocess.
is
- input stream to read from the error stream from the
subprocess
setProcessInputStream
public void setProcessInputStream(OutputStream os)
throws IOException
Install a handler for the input stream of the subprocess.
os
- output stream to write to the standard input stream of the
subprocess
setProcessOutputStream
public void setProcessOutputStream(InputStream is)
throws IOException
Install a handler for the output stream of the subprocess.
is
- input stream to read from the error stream from the
subprocess
start
public void start()
throws IOException
Start handling of the streams.
stop
public void stop()
Stop handling of the streams - will not be restarted.
Copyright B) 2001-2006 Ant-Contrib project. All Rights Reserved.