Package com.suse.common.io.process
Class ShellCommandExecutor
java.lang.Object
com.suse.common.io.process.ShellCommandExecutor
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionexecuteProcess(String... command) Executes a command in a processGets the last executed commandprivate StringgetOutput(InputStream stream, String logPrefix)
-
Field Details
-
LOGGER
private static final org.apache.logging.log4j.Logger LOGGER -
runtime
-
lastExecutedCommand
-
-
Constructor Details
-
ShellCommandExecutor
public ShellCommandExecutor()Constructor
-
-
Method Details
-
getLastExecutedCommand
Gets the last executed command- Returns:
- the last executed command string
-
executeProcess
Executes a command in a process- Parameters:
command- list of strings to be joined as a command- Returns:
- a process output object
- Throws:
ExecutionException- if anything goes wrong
-
getOutput
- Throws:
IOException
-