ch.javasoft.job
Class StdErrNonEmptyException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by ch.javasoft.job.ExecException
              extended by ch.javasoft.job.StdErrNonEmptyException
All Implemented Interfaces:
Serializable

public class StdErrNonEmptyException
extends ExecException

An exception which is thrown by ExecJob.execWaitForStdOutString() or ExecJobMonitor.waitForStdOutString() respectively if the process was writing to the error stream.
Both standard out and standard error output are available, either as String or with BufferedReaders allowing linewise accessing the output.

See Also:
Serialized Form

Constructor Summary
StdErrNonEmptyException(String stdOut, String stdErr)
           
 
Method Summary
 String getStdErr()
           
 BufferedReader getStdErrReader()
           
 String getStdOut()
           
 BufferedReader getStdOutReader()
           
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

StdErrNonEmptyException

public StdErrNonEmptyException(String stdOut,
                               String stdErr)
Method Detail

getStdErr

public String getStdErr()
Returns:
the standard error as a string

getStdErrReader

public BufferedReader getStdErrReader()
Returns:
The standard error as buffered reader. Each call to this method creates a new reader instance.

getStdOut

public String getStdOut()
Returns:
the standard output as a string

getStdOutReader

public BufferedReader getStdOutReader()
Returns:
The standard error as buffered reader. Each call to this method creates a new reader instance.