public final 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.
|
| Modifier and Type | Method and Description |
|---|---|
static void |
consumeProcessConsole(Process process,
Consumer<String> outputListener,
Consumer<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,
Consumer<Integer> exitValueListener)
Create a thread that wait for the given process to end, and call the given listener.
|
Copyright © 2019. All rights reserved.