Class ExecResult

    • Constructor Detail

      • ExecResult

        public ExecResult​(ExecCommand command,
                          InputStream stdout,
                          InputStream stderr,
                          int exitValue)
        Creates a ExecResult instance.
        Parameters:
        command - A not-null reference of ExecCommand, that produced the result.
        stdout - InputStream with the stdout of the command executable. If there was no stdout, the value must be null.
        stderr - InputStream with the stderr of the command executable. If there was no stderr, the value must be null.
        exitValue - the exit value of the command executable.
    • Method Detail

      • getCommand

        public ExecCommand getCommand()
        The executed command, that produced this result. The returned object is never null.
        Returns:
        The executed command, that produced this result.
      • getExitValue

        public int getExitValue()
        The exit value of the command executable.
        Returns:
        The exit value of the command executable
      • getStdout

        public InputStream getStdout()
        Returns the content of the standart output (stdout) of the executed command or null, if no output was produced in the stdout.
        Returns:
        The standart output (stdout) of the command executable.
      • getStderr

        public InputStream getStderr()
        Returns the content of the standart error output (stderr) of the executed command or null, if no output was produced in the stderr.
        Returns:
        The standart error output (stderr) of the command executable.