ca.utoronto.SimpleProcess
Class SimpleProcess

java.lang.Object
  extended byca.utoronto.SimpleProcess.SimpleProcess

public class SimpleProcess
extends Object

SimpleProcess: A simpler interface for running external processes

Author:
David James

Constructor Summary
SimpleProcess(String[] command)
          Create a new SimpleProcess object
 
Method Summary
static String run(String[] command)
          Run a process and return its result as a string
 BufferedReader stderr()
          Access the stderr stream for the process
 BufferedReader stdout()
          Access the stdout stream for the process
 int waitFor()
          Wait for the process to exit
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleProcess

public SimpleProcess(String[] command)
              throws IOException
Create a new SimpleProcess object

Parameters:
command - The command to run
Method Detail

run

public static String run(String[] command)
                  throws IOException,
                         InterruptedException
Run a process and return its result as a string

Parameters:
command - The command to run
Throws:
IOException
InterruptedException

stderr

public BufferedReader stderr()
Access the stderr stream for the process


stdout

public BufferedReader stdout()
Access the stdout stream for the process


waitFor

public int waitFor()
            throws InterruptedException
Wait for the process to exit

Throws:
InterruptedException


JCVSReport: Easy Progress Reports for CVS/Java Projects. By David James.