public class ProcessUtil extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
ProcessUtil.ConsoleConsumer
Thread that read from the given stream and call the listener for each line.
|
| Constructor and Description |
|---|
ProcessUtil() |
| Modifier and Type | Method and Description |
|---|---|
static void |
consumeProcessConsole(Process process,
Listener<String> outputListener,
Listener<String> errorListener)
Launch 2 threads to consume both output and error streams, and call the listeners for each line read.
|
static void |
onProcessExited(Process process,
Listener<Integer> exitValueListener)
Create a thread that wait for the given process to end, and call the given listener.
|
Copyright © 2017. All rights reserved.