com.darwinsys.util
Class ExecAndPrint
java.lang.Object
|
+--com.darwinsys.util.ExecAndPrint
- public class ExecAndPrint
- extends java.lang.Object
ExecAndPrint runs a program using Runtime.exec(),
read the program's output, and returns its exit status.
|
Field Summary |
protected static java.lang.Runtime |
r
Need a Runtime object for any of these methods |
|
Method Summary |
protected static int |
run(java.lang.String cmd)
Run the command given as a String, printing its output to System.out |
protected static int |
run(java.lang.String[] cmd)
Run the command given as a String[], print its output to System.out |
protected static int |
run(java.lang.String[] cmd,
java.io.Writer out)
Run the command given as a String[], print its output to "out" |
protected static int |
run(java.lang.String cmd,
java.io.Writer out)
Run the command given as a String, print its output to "out" |
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
r
protected static java.lang.Runtime r
- Need a Runtime object for any of these methods
ExecAndPrint
public ExecAndPrint()
run
protected static int run(java.lang.String cmd)
throws java.io.IOException
- Run the command given as a String, printing its output to System.out
run
protected static int run(java.lang.String cmd,
java.io.Writer out)
throws java.io.IOException
- the command given as a String, print its output to "out"
run
protected static int run(java.lang.String[] cmd)
throws java.io.IOException
- Run the command given as a String[], print its output to System.out
run
protected static int run(java.lang.String[] cmd,
java.io.Writer out)
throws java.io.IOException
- Run the command given as a String[], print its output to "out"