|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--s2iProcess
A class for running programs with a text window to show the output.
Field Summary | |
private java.lang.String[] |
cmd
The command strings to run |
private javax.swing.JTextArea |
textArea
The text area to display output in |
Constructor Summary | |
s2iProcess(java.lang.String[] arg)
Construct a process with a series of commands, discarding output |
|
s2iProcess(java.lang.String[] arg,
javax.swing.JTextArea ta)
Construct a process with a series of commands, displaying output in a text area |
Method Summary | |
static void |
main(java.lang.String[] argv)
test the class. |
private static void |
plugTogether(java.io.InputStream in,
java.io.OutputStream out)
Arrange to have all input from a stream copied to another stream. |
private static void |
plugTogether(javax.swing.JTextArea textarea,
java.io.InputStream in)
Arrange to have all input from a stream printed in a text area. |
private static void |
plugTogether(java.io.OutputStream out,
java.io.InputStream in)
Arrange to have all input from a stream copied to another stream. |
void |
run()
Run the commands. |
static java.lang.Process |
runProg(java.lang.String cmd)
Run a single command without waiting. |
static java.lang.Process |
runProgInTxtArea(java.lang.String cmd,
javax.swing.JTextArea tArea)
Run a single command without waiting. |
Methods inherited from class java.lang.Object |
|
Field Detail |
private java.lang.String[] cmd
private javax.swing.JTextArea textArea
Constructor Detail |
public s2iProcess(java.lang.String[] arg)
arg
- The Vector of command Stringspublic s2iProcess(java.lang.String[] arg, javax.swing.JTextArea ta)
arg
- The Vector of command StringsMethod Detail |
public void run()
public static java.lang.Process runProg(java.lang.String cmd) throws java.io.IOException
cmd
- The command String to runpublic static java.lang.Process runProgInTxtArea(java.lang.String cmd, javax.swing.JTextArea tArea) throws java.io.IOException
cmd
- The command String to runtArea
- The text area to display output inpublic static void main(java.lang.String[] argv)
java s2iProcess "write s2iProcess.java"Runs an editor on this java file.
private static void plugTogether(javax.swing.JTextArea textarea, java.io.InputStream in)
textarea
- The text area that will display outputin
- The input stream that is to be printedprivate static void plugTogether(java.io.InputStream in, java.io.OutputStream out)
in
- The input stream to copy fromout
- The output stream to copy toprivate static void plugTogether(java.io.OutputStream out, java.io.InputStream in)
out
- The output stream to copy toin
- The input stream to copy from
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |