|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sf.antcontrib.cpptasks.compiler.CaptureStreamHandler
public class CaptureStreamHandler
Implements ExecuteStreamHandler to capture the output of a Execute to an array of strings
| Constructor Summary | |
|---|---|
CaptureStreamHandler()
|
|
| Method Summary | |
|---|---|
void |
gatherOutput()
Reads concurrently both the process standard output and standard error. |
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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public CaptureStreamHandler()
| Method Detail |
|---|
public static String[] run(String[] cmdline)
cmdline - command line arguments
public String[] getOutput()
public void gatherOutput()
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 subprocess
IOException
public 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
subprocess
IOException
public 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 subprocess
IOException
public void start()
throws IOException
start in interface org.apache.tools.ant.taskdefs.ExecuteStreamHandlerIOExceptionpublic void stop()
stop in interface org.apache.tools.ant.taskdefs.ExecuteStreamHandler
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||