org.erights.e.meta.java.lang
Class ProcessSugar

java.lang.Object
  |
  +--org.erights.e.meta.java.lang.ProcessSugar

public class ProcessSugar
extends Object

Untamed: A sweetener defining extra messages that may be e-sent to Processes.

Author:
Mark S. Miller

Constructor Summary
private ProcessSugar()
          prevent instantiation
 
Method Summary
static CharPipeAdapter attachStderr(Process self, Writer alterr)
          Enabled:
static CharPipeAdapter attachStdin(Process self, Reader altin)
          Enabled:
static CharPipeAdapter attachStdout(Process self, Writer altout)
          Enabled:
static BufferedReader getStderr(Process self)
          Enabled:
static TextWriter getStdin(Process self)
          Enabled:
static BufferedReader getStdout(Process self)
          Enabled:
static Object[] results(Process self)
          Enabled: Use only on prompt processes, as this will block the vat until the process completes!
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProcessSugar

private ProcessSugar()
prevent instantiation

Method Detail

getStdin

public static TextWriter getStdin(Process self)
Enabled:

Parameters:
self -
Returns:

attachStdin

public static CharPipeAdapter attachStdin(Process self,
                                          Reader altin)
Enabled:

Parameters:
self -
altin -
Returns:

getStdout

public static BufferedReader getStdout(Process self)
Enabled:

Parameters:
self -
Returns:

attachStdout

public static CharPipeAdapter attachStdout(Process self,
                                           Writer altout)
Enabled:

Parameters:
self -
altout -
Returns:

getStderr

public static BufferedReader getStderr(Process self)
Enabled:

Parameters:
self -
Returns:

attachStderr

public static CharPipeAdapter attachStderr(Process self,
                                           Writer alterr)
Enabled:

Parameters:
self -
alterr -
Returns:

results

public static Object[] results(Process self)
                        throws InterruptedException
Enabled: 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?