ch.sf.htt
Class ExecResult

java.lang.Object
  extended by ch.sf.htt.ExecResult

public class ExecResult
extends java.lang.Object

Container for results of Runtime.exec() calls, immutable class.


Constructor Summary
ExecResult(int returnCode, java.util.List<java.lang.String> standardOut, java.util.List<java.lang.String> standardErr)
          Constructor.
 
Method Summary
 int getReturnCode()
          Get the platform-specific return code of the external process.
 java.util.List<java.lang.String> getStandardErr()
          Get all text that was produced by the external process on standard error.
 java.util.List<java.lang.String> getStandardOut()
          Get all text that was produced by the external process on standard out.
 boolean wasSuccessful()
          Allows to check if the test completed successfully.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExecResult

public ExecResult(int returnCode,
                  java.util.List<java.lang.String> standardOut,
                  java.util.List<java.lang.String> standardErr)
Constructor. Usually you do not use this by yourself.

Parameters:
returnCode - The return code.
standardOut - A list of strings where each entry will be a line for the output stream.
standardErr - A list of strings where each entry will be a line for the error stream.
Method Detail

wasSuccessful

public boolean wasSuccessful()
Allows to check if the test completed successfully.

Returns:
True if the test was successful.

getReturnCode

public int getReturnCode()
Get the platform-specific return code of the external process.

Returns:
The return code of the process.

getStandardErr

public java.util.List<java.lang.String> getStandardErr()
Get all text that was produced by the external process on standard error.

Returns:
A list of strings where every entry is one line of the process standard error output.

getStandardOut

public java.util.List<java.lang.String> getStandardOut()
Get all text that was produced by the external process on standard out.

Returns:
A String-array whereas every entry is one line of the process standard output.