|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.enhydra.xml.xmlc.misc.ProcessRunner
Run a process, optionally collecting stdout/stderr.
Field Summary | |
static int |
COLLECT_STDERR
|
static int |
COLLECT_STDOUT
|
static int |
DUMP_STDERR_ON_FAIL
|
(package private) int |
exitCode
Exit code of last process. |
static int |
NO_EXCEPTION_ON_ERR_EXIT
|
static int |
PASS_STDERR
|
static int |
PASS_STDOUT
Options to enable passing or collecting of output. |
static int |
STDERR_TO_REPORTER
|
Constructor Summary | |
ProcessRunner(int opts)
Constructor. |
Method Summary | |
int |
getExitCode()
|
int |
getOptions()
Get the options |
java.lang.String |
getStderr()
Get accumulated stderr, or null if it was not collected. |
java.lang.String |
getStdout()
Get accumulated stdout, or null if it was not collected. |
void |
run(java.lang.String[] cmd,
ErrorReporter errorReporter,
java.io.PrintWriter verboseOut,
java.lang.String failMsg)
Run a process. |
void |
setOptions(int opts)
Set the options |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int PASS_STDOUT
public static final int PASS_STDERR
public static final int COLLECT_STDOUT
public static final int COLLECT_STDERR
public static final int STDERR_TO_REPORTER
public static final int DUMP_STDERR_ON_FAIL
public static final int NO_EXCEPTION_ON_ERR_EXIT
int exitCode
Constructor Detail |
public ProcessRunner(int opts)
Method Detail |
public void setOptions(int opts)
public int getOptions()
public int getExitCode()
public void run(java.lang.String[] cmd, ErrorReporter errorReporter, java.io.PrintWriter verboseOut, java.lang.String failMsg) throws XMLCException
cmd
- Program to run and arguments.verboseOut
- Write verbose message to this file if not null.failMsg
- Message to use in exception if process fails.
XMLCException
public java.lang.String getStdout()
public java.lang.String getStderr()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |