Package org.aesh.terminal.tty.utils
Class ProcessHelper
java.lang.Object
org.aesh.terminal.tty.utils.ProcessHelper
Utility for executing external processes and capturing their output.
- Author:
- Ståle W. Pedersen
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classResult of a process execution. -
Method Summary
Modifier and TypeMethodDescriptionstatic ProcessHelper.ProcessResultExecute a command with a timeout and capture its output.static ProcessHelper.ProcessResultExecute a command and capture its output.
-
Method Details
-
execute
Execute a command and capture its output.- Parameters:
command- the command and arguments- Returns:
- the process result
-
execute
Execute a command with a timeout and capture its output.- Parameters:
timeoutMs- timeout in millisecondscommand- the command and arguments- Returns:
- the process result
-