ProcessHelper

processing.app.exec

## Class ProcessHelper

- Object
- - ProcessHelper

-     public class ProcessHelper
      extends Object

  Class to handle calling Runtime.exec() and stuffing output and error streams into Strings that can be dealt with more easily.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ProcessHelper(File dir, String... cmd)`
    `ProcessHelper(String... cmd)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `ProcessResult` | `execute()` Blocking execution.
    `ProcessResult` | `execute(String outgoing)` Blocks execution, also passes a single line to the command's input stream.
    `String` | `toString()`

    - ### Methods inherited from class Object

      `equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### ProcessHelper

          public ProcessHelper(String... cmd)

    - #### ProcessHelper

          public ProcessHelper(File dir,
                       String... cmd)

  - ### Method Detail

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

    - #### execute

          public ProcessResult execute()
                                throws InterruptedException,
                                       IOException

      Blocking execution.
      Returns:
        exit value of process
      Throws:
        `InterruptedException`
        `IOException`

    - #### execute

          public ProcessResult execute(String outgoing)
                                throws InterruptedException,
                                       IOException

      Blocks execution, also passes a single line to the command's input stream.
      Returns:
        exit value of process
      Throws:
        `InterruptedException`
        `IOException`