|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectto.etc.util.ProcessTools
public class ProcessTools
Helper code to spawn processes and capture their output.
Nested Class Summary | |
---|---|
static class |
ProcessTools.StreamCopyThread
This is used to async read strout and stderr streams from a process into another output stream. |
static class |
ProcessTools.StreamReaderThread
This is used to async read strout and stderr streams from a process... |
Method Summary | |
---|---|
static int |
dumpStreams(java.lang.Process pr,
java.lang.Appendable iosb)
Waits for completion of the command and collect data into the streams. |
static int |
runProcess(java.lang.ProcessBuilder pb,
java.lang.Appendable sb)
Runs the process whose data is in the ProcessBuilder and captures the result with stdout and stderr merged. |
static int |
runProcess(java.lang.ProcessBuilder pb,
java.lang.Appendable outsb,
java.lang.Appendable errsb)
Runs the process whose data is in the ProcessBuilder and captures the result with stdout and stderr merged. |
static int |
runProcess(java.lang.ProcessBuilder pb,
java.io.OutputStream stdout,
java.lang.Appendable stderrsb)
Runs the process whose data is in the ProcessBuilder and captures the result. |
static int |
runProcess(java.lang.ProcessBuilder pb,
java.io.Writer out)
Runs the process whose data is in the ProcessBuilder and captures the result with stdout and stderr merged into a writer. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static int dumpStreams(java.lang.Process pr, java.lang.Appendable iosb) throws java.lang.Exception
java.lang.Exception
public static int runProcess(java.lang.ProcessBuilder pb, java.lang.Appendable sb) throws java.lang.Exception
pb
- sb
-
java.lang.Exception
public static int runProcess(java.lang.ProcessBuilder pb, java.io.OutputStream stdout, java.lang.Appendable stderrsb) throws java.lang.Exception
pb
- sb
-
java.lang.Exception
public static int runProcess(java.lang.ProcessBuilder pb, java.lang.Appendable outsb, java.lang.Appendable errsb) throws java.lang.Exception
pb
- sb
-
java.lang.Exception
public static int runProcess(java.lang.ProcessBuilder pb, java.io.Writer out) throws java.lang.Exception
pb
- sb
-
java.lang.Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |