org.objectweb.common
Class Cmd

java.lang.Object
  |
  +--org.objectweb.common.Cmd

public class Cmd
extends java.lang.Object


Constructor Summary
Cmd(java.lang.String cmd)
          Construtor method of Cmd class.
Cmd(java.lang.String cmd, java.lang.String[] env)
          Construtor method of Cmd class.
 
Method Summary
 void addArgument(java.lang.String arg)
          Add a new argument to the command.
 void addArguments(java.util.Vector args)
          Add a new argument to the command.
 boolean run()
          Execute the command.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Cmd

public Cmd(java.lang.String cmd)
Construtor method of Cmd class.
Parameters:
cmd - command

Cmd

public Cmd(java.lang.String cmd,
           java.lang.String[] env)
Construtor method of Cmd class.
Parameters:
cmd - command
Method Detail

addArgument

public void addArgument(java.lang.String arg)
Add a new argument to the command.
Parameters:
arg - argument added to the tail of the command argument list

addArguments

public void addArguments(java.util.Vector args)
Add a new argument to the command.
Parameters:
arg - argument added to the tail of the command argument list

run

public boolean run()
Execute the command. (In case of the exit value of the command is not 0, the output and error streams of the command is traced.)
Returns:
false if the command cannot be executed, or if its exit value is not 0.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object