|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectigpp.util.Process
public class Process
Run a command line and collect the output in String buffers. Class is threaded so that multiple instances can be executed.
Constructor Summary | |
---|---|
Process()
|
Method Summary | |
---|---|
static ArrayList<String> |
argSplit(String buffer,
boolean onlyWhitespace)
Split a string into one or more substrings by parsing on whitespace and treating "!" and "=" as individual arguments. |
ArrayList<String> |
getOutput()
Retrieve the output from the last run. |
String |
getOutputHTML()
Retrieve the output from the last run formatted for HTML. |
int |
run(String command)
Run a command line. |
int |
run(String command,
String home)
Run a command line with a specified path as the home directory. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Process()
Method Detail |
---|
public int run(String command)
getOutput()
.
command
- the command line to run.
public int run(String command, String home)
getOutput()
.
command
- the command line to run.home
- the path to the home directory in which to run the command.
public ArrayList<String> getOutput()
ArrayList
of String
s with each line of the output.public String getOutputHTML()
String
containing the output formatted as HTML.public static ArrayList<String> argSplit(String buffer, boolean onlyWhitespace)
buffer
- the string to parse.onlyWhitespace
- if true
split the string
using only whitespace as a delimiter. If false
the string is parsed on whitespace and "!" and "="
are considered as individual arguments.
ArrayList
an array of arguments.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |