Module JavaProc

Class ProcResult


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

      • 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.

      • 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.