Package: org.codehaus.groovy.runtime

## [Java] Class ProcessResult

- org.codehaus.groovy.runtime.ProcessResult

-     public class ProcessResult
      extends Object

  Captures the result of executing an external process, including the standard output, standard error, and exit code.

       def result = "ls -la".execute().waitForResult()
       assert result.ok
       println result.out

  Since:
    6.0.0
  See Also:
    ProcessGroovyMethods.waitForResult

- - ### Constructor Summary

    Constructors
    Constructor and description
    `ProcessResult(String out, String err, int exitCode)`

  - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `public String` | `getErr()` Returns the standard error of the process as a String.
    `` | `public int` | `getExitCode()` Returns the exit code of the process.
    `` | `public String` | `getOut()` Returns the standard output of the process as a String.
    `` | `public boolean` | `isOk()` Returns `true` if the process exited with code 0.
    `` | `public String` | `toString()`

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class Object` | `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### public ProcessResult(String out, String err, int exitCode)

  - ### Method Detail

    - #### public String getErr()

      Returns the standard error of the process as a String.

    - #### public int getExitCode()

      Returns the exit code of the process.

    - #### public String getOut()

      Returns the standard output of the process as a String.

    - #### public boolean isOk()

      Returns `true` if the process exited with code 0.

    - #### public String toString()