@Deprecated public final class ExecUtils extends Object
Modifier and Type | Field and Description |
---|---|
static String |
STDERR
Deprecated.
Identifier for standard error.
|
static String |
STDOUT
Deprecated.
Identifier for standard output.
|
Modifier and Type | Method and Description |
---|---|
static int |
watchProcess(Process process)
Deprecated.
Watches a running process.
|
static int |
watchProcess(Process process,
com.norconex.commons.lang.io.IStreamListener listener)
Deprecated.
Watches a running process.
|
static int |
watchProcess(Process process,
com.norconex.commons.lang.io.IStreamListener[] listeners)
Deprecated.
Watches a running process.
|
static int |
watchProcess(Process process,
com.norconex.commons.lang.io.IStreamListener[] outputListeners,
com.norconex.commons.lang.io.IStreamListener[] errorListeners)
Deprecated.
Watches a running process.
|
static int |
watchProcess(Process process,
com.norconex.commons.lang.io.IStreamListener outputListener,
com.norconex.commons.lang.io.IStreamListener errorListener)
Deprecated.
Watches a running process.
|
static void |
watchProcessOutput(Process process,
com.norconex.commons.lang.io.IStreamListener[] outputListeners,
com.norconex.commons.lang.io.IStreamListener[] errorListeners)
Deprecated.
Watches process output.
|
static void |
watchProcessOutput(Process process,
com.norconex.commons.lang.io.IStreamListener outputListener,
com.norconex.commons.lang.io.IStreamListener errorListener)
Deprecated.
Watches process output.
|
public static final String STDOUT
public static final String STDERR
public static int watchProcess(Process process) throws InterruptedException
StreamGobbler
to read its error and output stream.process
- the process to watchInterruptedException
- problem while waiting for process to finishpublic static int watchProcess(Process process, com.norconex.commons.lang.io.IStreamListener listener) throws InterruptedException
StreamGobbler
to read its error and output stream.
The listener will be notified every time an error or output line
gets written by the process.
The listener line type will either be "STDERR" or "STDOUT".process
- the process to watchlistener
- the listener to use for both "STDERR" or "STDOUT".InterruptedException
- problem while waiting for process to finishpublic static int watchProcess(Process process, com.norconex.commons.lang.io.IStreamListener[] listeners) throws InterruptedException
StreamGobbler
to read its error and output stream.
The listener will be notified every time an error or output line
gets written by the process.
The listener line type will either be "STDERR" or "STDOUT".process
- the process to watchlisteners
- the listeners to use for both "STDERR" or "STDOUT".InterruptedException
- problem while waiting for process to finishpublic static int watchProcess(Process process, com.norconex.commons.lang.io.IStreamListener outputListener, com.norconex.commons.lang.io.IStreamListener errorListener) throws InterruptedException
StreamGobbler
to read its error and output stream.
The listener will be notified every time an error or output line
gets written by the process.
The listener line type will either be "STDERR" or "STDOUT".process
- the process to watchoutputListener
- the process output listenererrorListener
- the process error listenerInterruptedException
- problem while waiting for process to finishpublic static int watchProcess(Process process, com.norconex.commons.lang.io.IStreamListener[] outputListeners, com.norconex.commons.lang.io.IStreamListener[] errorListeners) throws InterruptedException
StreamGobbler
to read its error and output stream.
The listeners will be notified every time an error or output line
gets written by the process.
The listener line type will either be "STDERR" or "STDOUT".process
- the process to watchoutputListeners
- the process output listenerserrorListeners
- the process error listenersInterruptedException
- problem while waiting for process to finishpublic static void watchProcessOutput(Process process, com.norconex.commons.lang.io.IStreamListener outputListener, com.norconex.commons.lang.io.IStreamListener errorListener)
watchProcess(Process, IStreamListener, IStreamListener)
with the exception of not waiting for the process to complete before
returning.process
- the process on which to watch outputsoutputListener
- the process output listenerserrorListener
- the process error listenerspublic static void watchProcessOutput(Process process, com.norconex.commons.lang.io.IStreamListener[] outputListeners, com.norconex.commons.lang.io.IStreamListener[] errorListeners)
watchProcess(Process, IStreamListener[], IStreamListener[])
with the exception of not waiting for the process to complete before
returning.process
- the process on which to watch outputsoutputListeners
- the process output listenerserrorListeners
- the process error listenersCopyright © 2007–2021 Norconex Inc.. All rights reserved.