Class ProcessOutput


  • public class ProcessOutput
    extends java.lang.Object
    Represent the output of the execution of a process
    • Constructor Summary

      Constructors 
      Constructor Description
      ProcessOutput​(int exitCodeIn)
      Builds an instance with only the exit code
      ProcessOutput​(int exitCodeIn, java.lang.String standardOutputIn, java.lang.String standardErrorIn)
      Default constructor
    • Field Detail

      • exitCode

        private final int exitCode
      • standardOutput

        private final java.lang.String standardOutput
      • standardError

        private final java.lang.String standardError
    • Constructor Detail

      • ProcessOutput

        public ProcessOutput​(int exitCodeIn,
                             java.lang.String standardOutputIn,
                             java.lang.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 Detail

      • 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 java.lang.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 java.lang.String getStandardError()
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

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

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object