- java.lang.Object
-
- com.simtechdata.process.ProcResult
-
public class ProcResult extends Object
Represents the result of a successful process execution.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description StringgetCommandLine()byte[]getErrorBytes()StringgetErrorString()longgetExecutionTime()intgetExitValue()byte[]getOutputBytes()StringgetOutputString()StringgetProcString()Deprecated.Use #getCommandLine() instead.
-
-
-
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.
-
getOutputString
public String getOutputString() throws IllegalStateException
- Returns:
- the standard output as string
- Throws:
IllegalStateException- if an OutputStream has been provided to capture the output
-
getOutputBytes
public byte[] getOutputBytes() throws IllegalStateException- Returns:
- the standard output as byte[]
- Throws:
IllegalStateException- if an OutputStream has been provided to capture 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.
-
-