java.lang
Class Process

java.lang.Object
  |
  +--java.lang.Process
Direct Known Subclasses:
Win32Process

public abstract class Process
extends Object

Untamed:


Constructor Summary
Process()
          Enabled:
 
Method Summary
 CharPipeAdapter attachStderr(Writer alterr)
          Added:
 CharPipeAdapter attachStdin(Reader altin)
          Added:
 CharPipeAdapter attachStdout(Writer altout)
          Added:
abstract  void destroy()
          Enabled: Kills the subprocess.
abstract  int exitValue()
          Enabled: Returns the exit value for the subprocess.
abstract  InputStream getErrorStream()
          Enabled: Gets the error stream of the subprocess.
abstract  InputStream getInputStream()
          Enabled: Gets the input stream of the subprocess.
abstract  OutputStream getOutputStream()
          Enabled: Gets the output stream of the subprocess.
 BufferedReader getStderr()
          Added:
 TextWriter getStdin()
          Added:
 BufferedReader getStdout()
          Added:
 Object[] results()
          Added: Use only on prompt processes, as this will block the vat until the process completes!
abstract  int waitFor()
          Enabled: causes the current thread to wait, if necessary, until the process represented by this Process object has terminated.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Process

public Process()
Enabled:

Method Detail

getOutputStream

public abstract OutputStream getOutputStream()
Enabled: Gets the output stream of the subprocess. Output to the stream is piped into the standard input stream of the process represented by this Process object.

Implementation note: It is a good idea for the output stream to be buffered.

Returns:
the output stream connected to the normal input of the subprocess.

getInputStream

public abstract InputStream getInputStream()
Enabled: Gets the input stream of the subprocess. The stream obtains data piped from the standard output stream of the process represented by this Process object.

Implementation note: It is a good idea for the input stream to be buffered.

Returns:
the input stream connected to the normal output of the subprocess.

getErrorStream

public abstract InputStream getErrorStream()
Enabled: Gets the error stream of the subprocess. The stream obtains data piped from the error output stream of the process represented by this Process object.

Implementation note: It is a good idea for the input stream to be buffered.

Returns:
the input stream connected to the error stream of the subprocess.

waitFor

public abstract int waitFor()
                     throws InterruptedException
Enabled: causes the current thread to wait, if necessary, until the process represented by this Process object has terminated. This method returns immediately if the subprocess has already terminated. If the subprocess has not yet terminated, the calling thread will be blocked until the subprocess exits.

Returns:
the exit value of the process. By convention, 0 indicates normal termination.
InterruptedException

exitValue

public abstract int exitValue()
Enabled: Returns the exit value for the subprocess.

Returns:
the exit value of the subprocess represented by this Process object. by convention, the value 0 indicates normal termination.

destroy

public abstract void destroy()
Enabled: Kills the subprocess. The subprocess represented by this Process object is forcibly terminated.


getStdin

public TextWriter getStdin()
Added:

Returns:

attachStdin

public CharPipeAdapter attachStdin(Reader altin)
Added:

Parameters:
altin -
Returns:

getStdout

public BufferedReader getStdout()
Added:

Returns:

attachStdout

public CharPipeAdapter attachStdout(Writer altout)
Added:

Parameters:
altout -
Returns:

getStderr

public BufferedReader getStderr()
Added:

Returns:

attachStderr

public CharPipeAdapter attachStderr(Writer alterr)
Added:

Parameters:
alterr -
Returns:

results

public Object[] results()
                 throws InterruptedException
Added: Use only on prompt processes, as this will block the vat until the process completes!

Waits for the Process to exit.

Returns:
A triple of the exitCode, the text sent to stdout as a String, and the text sent to stderr as a String.
InterruptedException


comments?