public class ProcUtils extends Object
| Constructor and Description |
|---|
ProcUtils() |
| Modifier and Type | Method and Description |
|---|---|
static int |
runProcess(int reserved,
long waitFor,
StringBuilder capturedStdout,
String... words) |
static void |
runProcess(long waitFor,
String... words)
Run a process and assert the exit code is 0.
|
static void |
runProcess(long waitFor,
StringBuilder capturedStdout,
String... words)
Run a process, collect the stdout, and assert the exit code is 0.
|
static int |
tryProcess(String logText,
long waitFor,
String... words)
Run a process.
|
static int |
tryProcess(String logText,
long waitFor,
StringBuilder capturedStdout,
String... words)
Run a process, collect the stdout.
|
public static void runProcess(long waitFor,
String... words)
throws IOException,
InterruptedException
waitFor - How long to wait for the command to executewords - The words of the command to runIOException - if something goes wrong on the IO endInterruptedException - If this thread is interruptedpublic static void runProcess(long waitFor,
StringBuilder capturedStdout,
String... words)
throws IOException,
InterruptedException
waitFor - How long to wait for the command to executecapturedStdout - Whatever the process wrote to standard outwords - The words of the command to runIOException - if something goes wrong on the IO endInterruptedException - If this thread is interruptedpublic static int runProcess(int reserved,
long waitFor,
StringBuilder capturedStdout,
String... words)
throws IOException,
InterruptedException
IOExceptionInterruptedExceptionpublic static int tryProcess(String logText, long waitFor, String... words) throws IOException, InterruptedException
waitFor - How long to wait for the command to executewords - The words of the command to runIOException - if something goes wrong on the IO endInterruptedException - If this thread is interruptedpublic static int tryProcess(String logText, long waitFor, StringBuilder capturedStdout, String... words) throws IOException, InterruptedException
waitFor - How long to wait (milliseconds) for the command to executecapturedStdout - Whatever the process wrote to standard outwords - The words of the command to runIOException - if something goes wrong on the IO endInterruptedException - If this thread is interruptedCopyright © 2018 OpenDaylight. All rights reserved.