public class CLIUtils extends Object
| Constructor and Description |
|---|
CLIUtils() |
| Modifier and Type | Method and Description |
|---|---|
static void |
copyStream(InputStream input,
OutputStream output) |
static int |
executeCommand(String command)
Executes a command in the underlying shell.
|
static int |
executeCommand(String command,
InputStream input)
Executes a command in the underlying shell.
|
public static int executeCommand(String command) throws Exception
command - The command which will be executed.Exception - If the command could not be performed.public static int executeCommand(String command, InputStream input) throws Exception
command - The command which will be executed.input - The input stream that should be piped to command execution.Exception - If the command could not be performed.public static void copyStream(InputStream input, OutputStream output) throws IOException
IOExceptionCopyright © 2014. All Rights Reserved.