| java.lang.Object snow.utils.ProcessUtils
ProcessUtils | final public class ProcessUtils (Code) | | |
Method Summary | |
public static void | drainProcess(Process proc, boolean waitCompletion) Ignores the whole outputs. | public static Process | executeProcessAndGobble(String descr, File execDir, String... processArgs) DON'T USE the returned process streams, they are already gobbled. | public static Process | executeProcessAndGobble(List<String> processArgs, File execDir, String descr, OutputStream out, OutputStream errOut) Executes the command and gobbles the whole output, don't waits. | public static Process | executeProcessAndGobble(List<String> processArgs, String descr) Executes the process and drain the output... | public static Process | executeProcessAndGobbleToConsole(String descr, File execDir, String... processArgs) DON'T USE the returned process streams, they are already gobbled. | public static String | readWholeProcessStack(String... processArgs) | public static String | readWholeProcessStack(List<String> processArgs) | public static String | readWholeProcessStack(List<String> processArgs, long timeout) | public static String | readWholeProcessStack(List<String> processArgs, File execDir, long timeout) a text with the full output of the process. | public static String | readWholeProcessStack(List<String> processArgs, File execDir, List<String> toType, long timeout, boolean errorIfNotStatusExit0) |
drainProcess | public static void drainProcess(Process proc, boolean waitCompletion)(Code) | | Ignores the whole outputs. Must be called when processes are created and output is not read,
otherwise, probmels araises, see Java puzzlers
|
executeProcessAndGobble | public static Process executeProcessAndGobble(String descr, File execDir, String... processArgs) throws Exception(Code) | | DON'T USE the returned process streams, they are already gobbled.
Only sense: look at exit value (with waitFor(), the exitValue is buggy on linux...)
|
executeProcessAndGobble | public static Process executeProcessAndGobble(List<String> processArgs, File execDir, String descr, OutputStream out, OutputStream errOut) throws Exception(Code) | | Executes the command and gobbles the whole output, don't waits.
the process, can be used to waitFor, but not to gobble becauseit is already gobbled to nowhere ! |
executeProcessAndGobble | public static Process executeProcessAndGobble(List<String> processArgs, String descr) throws Exception(Code) | | Executes the process and drain the output...
DON't use the process outputs, they are already gobbled
|
executeProcessAndGobbleToConsole | public static Process executeProcessAndGobbleToConsole(String descr, File execDir, String... processArgs) throws Exception(Code) | | DON'T USE the returned process streams, they are already gobbled.
Only sense: look at exit value (WARNING: use waitFor(), the exitValue is buggy on linux...)
|
readWholeProcessStack | public static String readWholeProcessStack(List<String> processArgs) throws Exception(Code) | | a text with the full output of the process.Err and Out mixed.Use it only for small debugs or options reading from a programHas a 10 sec timeout. |
readWholeProcessStack | public static String readWholeProcessStack(List<String> processArgs, long timeout) throws Exception(Code) | | a text with the full output of the process.Err and Out mixed.Use it only for small debugs or options reading from a programm. |
readWholeProcessStack | public static String readWholeProcessStack(List<String> processArgs, File execDir, long timeout) throws Exception(Code) | | a text with the full output of the process. (With a timeout of 10 secs)Err and Out mixed.Use it only for small debugs or options reading from a program 10 sec timeout |
readWholeProcessStack | public static String readWholeProcessStack(List<String> processArgs, File execDir, List<String> toType, long timeout, boolean errorIfNotStatusExit0) throws Exception(Code) | | a text with the full output of the process.Err and Out mixed.Use it only for small debugs or options reading from a program. |
|
|