public class Process
extends java.lang.Object
Constructor and Description |
---|
Process() |
Modifier and Type | Method and Description |
---|---|
static java.util.ArrayList<java.lang.String> |
argSplit(java.lang.String buffer,
boolean onlyWhitespace)
Split a string into one or more substrings by parsing on
whitespace and treating "!" and "=" as individual arguments.
|
java.util.ArrayList<java.lang.String> |
getOutput()
Retrieve the output from the last run.
|
java.lang.String |
getOutputHTML()
Retrieve the output from the last run formatted for HTML.
|
int |
run(java.lang.String command)
Run a command line.
|
int |
run(java.lang.String command,
java.lang.String home)
Run a command line with a specified path as the home directory.
|
public int run(java.lang.String command)
getOutput()
.command
- the command line to run.public int run(java.lang.String command, java.lang.String home)
getOutput()
.command
- the command line to run.home
- the path to the home directory in which to run the command.public java.util.ArrayList<java.lang.String> getOutput()
ArrayList
of String
s with each line of the output.public java.lang.String getOutputHTML()
String
containing the output formatted as HTML.public static java.util.ArrayList<java.lang.String> argSplit(java.lang.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-2018 Regents University of California. All Rights Reserved.