Class ProcResult

java.lang.Object
org.buildobjects.process.ProcResult

public class ProcResult extends Object
Represents the result of a successful process execution.
  • Method Details

    • getProcString

      @Deprecated public String getProcString()
      Deprecated.
      Use #getCommandLine() instead.
      Returns:
      a string representation of the process invocation. This approximates the representation of this invocation in a shell. Note that the escaping of arguments is incomplete, it works only for whitespace. Fancy control characters are not replaced.
    • getCommandLine

      public String getCommandLine()
      Returns:
      a string representation of the process invocation. This approximates the representation of this invocation in a shell. Note that the escaping of arguments is incomplete, it works only for whitespace. Fancy control characters are not replaced.
    • getOutputString

      public String getOutputString() throws IllegalStateException
      Returns:
      the standard output as string
      Throws:
      IllegalStateException - if an OutputStream has been provided to captured the output
    • getOutputBytes

      public byte[] getOutputBytes() throws IllegalStateException
      Returns:
      the standard output as byte[]
      Throws:
      IllegalStateException - if an OutputStream has been provided to captured the output
    • getErrorString

      public String getErrorString() throws IllegalStateException
      Returns:
      the standard error as string
      Throws:
      IllegalStateException - if an OutputStream has been provided to capture the error output
    • getErrorBytes

      public byte[] getErrorBytes() throws IllegalStateException
      Returns:
      the standard error as byte[]
      Throws:
      IllegalStateException - if an OutputStream has been provided to capture the error output
    • getExitValue

      public int getExitValue()
      Returns:
      the exit value of the process
    • getExecutionTime

      public long getExecutionTime()
      Returns:
      the time the execution took in milliseconds.