org.opensha.commons.util
Class RunScript

java.lang.Object
  extended by org.opensha.commons.util.RunScript

public class RunScript
extends java.lang.Object

Title: RunScript

Description : Accepts the command and runs the shell script

Version:
1.0

Constructor Summary
RunScript()
           
 
Method Summary
static void displayOutput(java.io.InputStream is)
          display the input stream
static int displayProcessStatus(java.lang.Process pr, java.lang.String outFile, java.lang.String errFile)
          Display the process status while it is executing
static int runScript(java.lang.String[] command)
          accepts the command and executes on java runtime environment
static int runScript(java.lang.String[] command, java.lang.String outFile, java.lang.String errFile)
          accepts the command and executes on java runtime environment
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RunScript

public RunScript()
Method Detail

runScript

public static int runScript(java.lang.String[] command,
                            java.lang.String outFile,
                            java.lang.String errFile)
accepts the command and executes on java runtime environment

Parameters:
command - : command to execute

runScript

public static int runScript(java.lang.String[] command)
accepts the command and executes on java runtime environment

Parameters:
command - : command to execute

displayOutput

public static void displayOutput(java.io.InputStream is)
                          throws java.lang.Exception
display the input stream

Parameters:
is - inputstream
Throws:
java.lang.Exception

displayProcessStatus

public static int displayProcessStatus(java.lang.Process pr,
                                       java.lang.String outFile,
                                       java.lang.String errFile)
                                throws java.io.IOException
Display the process status while it is executing

Parameters:
pr -
Returns:
Throws:
java.io.IOException