|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.ijsberg.iglu.util.execution.CommandShell
public class CommandShell
Tries to start a command shell in the OS and establishes standard in- and output.
Input may be passed by invoking transmit(). Output can be obtained by passing registering a receiver by invoking open(Listener).
| Nested Class Summary | |
|---|---|
static class |
CommandShell.NewLineFilter
|
| Constructor Summary | |
|---|---|
CommandShell(String[] shellCommandArray,
File workingDir)
|
|
CommandShell(String[] shellCommandArray,
String[] alternativeEnvVars,
File workingDir)
|
|
CommandShell(String shellCommand,
File workingDir)
|
|
CommandShell(String shellCommand,
String[] alternativeEnvVars,
File workingDir)
|
|
| Method Summary | |
|---|---|
static int |
available()
|
void |
close()
|
static int |
execute(String[] commandArray,
String[] alternativeEnvVars,
File workingDir,
Receiver outputReceiver)
execute particular command |
static int |
execute(String command,
File dir)
|
static int |
execute(String command,
String[] envVars,
File dir)
Blindly invokes a shell command on Windows or Unix systems. |
static void |
executeRecursive(String command,
String rootdir)
|
boolean |
isClosed()
|
static void |
main(String[] args)
Runs test dialog. |
Receiver |
open(Receiver receiver)
Opens permanent shell |
static Object |
read()
|
void |
transmit(Object message)
Transmits |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public CommandShell(String[] shellCommandArray,
String[] alternativeEnvVars,
File workingDir)
shellCommandArray - alternativeEnvVars - workingDir - exec()
public CommandShell(String shellCommand,
String[] alternativeEnvVars,
File workingDir)
shellCommand - alternativeEnvVars - workingDir -
public CommandShell(String shellCommand,
File workingDir)
shellCommand - workingDir -
public CommandShell(String[] shellCommandArray,
File workingDir)
shellCommandArray - workingDir - | Method Detail |
|---|
public void transmit(Object message)
transmit in interface Transmittermessage - public void close()
close in interface Transmitterpublic boolean isClosed()
isClosed in interface Transmitterpublic static int available()
public static Object read()
public Receiver open(Receiver receiver)
open in interface Transceiverreceiver -
public static int execute(String[] commandArray,
String[] alternativeEnvVars,
File workingDir,
Receiver outputReceiver)
throws IOException
IOException
public static int execute(String command,
File dir)
throws IOException
command - dir -
IOException
public static int execute(String command,
String[] envVars,
File dir)
throws IOException
command - dir -
IOException
public static void executeRecursive(String command,
String rootdir)
throws IOException
command - rootdir -
IOExceptionpublic static void main(String[] args)
args -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||