Package com.topjohnwu.superuser
Class Shell.Result
java.lang.Object
com.topjohnwu.superuser.Shell.Result
- Enclosing class:
- Shell
The result of a
Shell.Job
.-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
This code indicates that the job was not executed, and the outputs are all empty. -
Constructor Summary
-
Method Summary
-
Field Details
-
JOB_NOT_EXECUTED
public static final int JOB_NOT_EXECUTEDThis code indicates that the job was not executed, and the outputs are all empty. Constant value: -1.- See Also:
-
-
Constructor Details
-
Result
public Result()
-
-
Method Details
-
getOut
Get the output of STDOUT.- Returns:
- a list of strings that stores the output of STDOUT. Empty list if no output is available.
-
getErr
Get the output of STDERR.- Returns:
- a list of strings that stores the output of STDERR. Empty list if no output is available.
-
getCode
public abstract int getCode()Get the return code of the job.- Returns:
- the return code of the last operation in the shell. If the job is executed
properly, the code should range from 0-255. If the job fails to execute, it will return
JOB_NOT_EXECUTED
.
-
isSuccess
public boolean isSuccess()Whether the job succeeded.getCode() == 0
.- Returns:
true
if the return code is 0.
-