|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectit.unimo.dbgroup.momis.tools.UnixCommand
Execute system commands wrapping results into strings.
This class contains only static components
and has been designed to run on Unix machines
(even if porting to Windows architecure will be pretty easy
it is enough to change the execution string "/bin/sh -c" whith
the appropriate command.)
This class is basically based on the method Runtime.exec();
| Field Summary | |
private static int |
BUFLEN
Size of the buffer used to read the output streams |
| Constructor Summary | |
UnixCommand()
|
|
| Method Summary | |
static int |
exec(java.lang.String[] param)
Executes a command and returns the stdOut and stdErr as strings. |
static void |
main(java.lang.String[] args)
Routine used to test the class. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
private static final int BUFLEN
| Constructor Detail |
public UnixCommand()
| Method Detail |
public static void main(java.lang.String[] args)
public static int exec(java.lang.String[] param)
param - way chosen way to pass strings.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||