| java.lang.Object com.sun.portal.fabric.util.ExecuteUtil
ExecuteUtil | public class ExecuteUtil (Code) | | Constructor for the Execute Utility
|
Method Summary | |
public int | exec(String command, String[] args) | public int | exec(String command, String[] args, String[] envs) | public String | getError() | public String | getOutput() | public void | storeError(boolean preserve) This method should be used to instruct the ExecuteUtil object to
retain the error of the process. | public void | storeOutput(boolean preserve) This method should be used to instruct the ExecuteUtil object to
retain the output of the process. |
exec | public int exec(String command, String[] args)(Code) | | Executes a command using the Runtime object
Parameters: command - Command as a String Parameters: args - A String array of arguments that the command needs for execution Returns the exit value of the command that was executed |
exec | public int exec(String command, String[] args, String[] envs)(Code) | | Executes a command using the Runtime object
Parameters: command - Command as a String Parameters: args - A String array of arguments that the command needs for execution Parameters: envs - A String array of environment variables Returns the exit value of the command that was executed |
getError | public String getError()(Code) | | Gets the data that was collected from the error stream of the process
that was executed before this call
Returns the content of the error stream as a String.A null is returned if the storeError() method was not called before the exec call |
getOutput | public String getOutput()(Code) | | Gets the data that was collected from the output stream of the process
that was executed before this call
Returns the content of the output stream as a String.A null is returned if the storeOutput() method was not called before the exec call |
storeError | public void storeError(boolean preserve)(Code) | | This method should be used to instruct the ExecuteUtil object to
retain the error of the process. This method should be invoked
with the correct params before the exec method is invoked
Parameters: preserve - boolean value flag that is used to decide if the errorstream of the process needs to be store for retrival after theexecution |
storeOutput | public void storeOutput(boolean preserve)(Code) | | This method should be used to instruct the ExecuteUtil object to
retain the output of the process. This method should be invoked
with the correct params before the exec method is invoked
Parameters: preserve - boolean value flag that is used to decide if the outputof the process needs to be store for retrival after the execution |
|
|