public class Process extends Object
Constructor and Description |
---|
Process() |
Modifier and Type | Method and Description |
---|---|
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.
|
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 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.Copyright © 2008-2009 Regents University of California. All Rights Reserved.