|
02/28/2005 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--com.epicentric.common.Command
Wrapper around Runtime.exec() that handles reading the output from the other process, etc.
| Field Summary | |
static int |
TIMEOUT
Deprecated. How long to wait before giving up on a command (milliseconds). |
| Constructor Summary | |
Command(String[] argsArray)
Deprecated. Create command and start it running. |
|
Command(Vector argsVector)
Deprecated. |
|
| Method Summary | |
void |
dumpResult(PrintWriter out)
Deprecated. Print the results of the command to an output stream (for debugging). |
String[] |
getArgs()
Deprecated. Get arguments used to start the command |
String |
getErrorOutput()
Deprecated. Get stderr from the command. |
int |
getExitValue()
Deprecated. Get the command's exit value. |
static String |
getIPAddress()
Deprecated. helper to retrieve the systems IP Address |
static String |
getMACAddress()
Deprecated. Retrieves the MAC Address (Hardware address) from the system. |
String |
getOutput()
Deprecated. Get stdout from the command. |
static boolean |
isMacintosh()
Deprecated. |
static boolean |
isOS2()
Deprecated. |
static boolean |
isWindows()
Deprecated. |
static void |
main(String[] args)
Deprecated. |
void |
println(String line)
Deprecated. Send a line of text to the command's input stream. |
void |
run()
Deprecated. |
boolean |
waitFor(long timeoutInMillis)
Deprecated. Wait for the command to finish. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final int TIMEOUT
| Constructor Detail |
public Command(String[] argsArray)
throws IOException,
InterruptedException
public Command(Vector argsVector)
throws IOException,
InterruptedException
| Method Detail |
public void println(String line)
public boolean waitFor(long timeoutInMillis)
throws InterruptedException,
IOException
public String[] getArgs()
public String getOutput()
public String getErrorOutput()
public int getExitValue()
public void dumpResult(PrintWriter out)
public void run()
run in interface Runnablepublic static boolean isWindows()
public static boolean isMacintosh()
public static boolean isOS2()
public static String getMACAddress()
- Windows: "ipconfig /all"
- Solaris: "/usr/sbin/arp ip_address"
- HPUX: "/usr/sbin/lanscan -a"
- LINUX: "/sbin/ifconfig"
- AIX: "/bin/entstat en0"
For AIX, it is also assumed that a NIC card exists at /dev/en0.
public static String getIPAddress()
public static void main(String[] args)
|
02/28/2005 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||