|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.scijava.util.ProcessUtils
public final class ProcessUtils
Useful methods for working with processes.
Method Summary | |
---|---|
static String |
exec(File workingDirectory,
InputStream in,
PrintStream err,
PrintStream out,
String... args)
Executes a program. |
static String |
exec(File workingDirectory,
PrintStream err,
PrintStream out,
String... args)
Executes a program. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static String exec(File workingDirectory, PrintStream err, PrintStream out, String... args)
workingDirectory
- the directory in which to execute the programerr
- the PrintStream
to print the program's error stream to;
if null is passed, the error goes straight to Nirvana (not the
band, though).out
- the PrintStream
to print the program's output to; if
null is passed, the output will be accumulated into a
String
and returned upon exit.args
- the command-line to execute, split into components
out
is null, otherwise an
empty String
RuntimeException
- if interrupted or the program failed to execute
successfully.public static String exec(File workingDirectory, InputStream in, PrintStream err, PrintStream out, String... args)
workingDirectory
- the directory in which to execute the programin
- the InputStream
which gets fed to the program as standard input;err
- the PrintStream
to print the program's error stream to;
if null is passed, the error goes straight to Nirvana (not the
band, though).out
- the PrintStream
to print the program's output to; if
null is passed, the output will be accumulated into a
String
and returned upon exit.args
- the command-line to execute, split into components
out
is null, otherwise an
empty String
RuntimeException
- if interrupted or the program failed to execute
successfully.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |