Class ProcessOutput

java.lang.Object
com.suse.coco.module.snpguest.execution.ProcessOutput

public class ProcessOutput extends Object
Represent the output of the execution of a process
  • Field Details

    • exitCode

      private final int exitCode
    • standardOutput

      private final String standardOutput
    • standardError

      private final String standardError
  • Constructor Details

    • ProcessOutput

      public ProcessOutput(int exitCodeIn, String standardOutputIn, String standardErrorIn)
      Default constructor
      Parameters:
      exitCodeIn - process exit code
      standardOutputIn - the standard output
      standardErrorIn - the standard error
    • ProcessOutput

      public ProcessOutput(int exitCodeIn)
      Builds an instance with only the exit code
      Parameters:
      exitCodeIn - process exit code
  • Method Details

    • getExitCode

      public int getExitCode()
    • hasStandardOutput

      public boolean hasStandardOutput()
      Check if this process output has a non-empty standard output
      Returns:
      true if the standard output is not null and not blank
    • getStandardOutput

      public String getStandardOutput()
    • hasStandardError

      public boolean hasStandardError()
      Check if this process output has a non-empty standard error
      Returns:
      true if the standard error is not null and not blank
    • getStandardError

      public String getStandardError()
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object