Class ProcessRunner.Result

java.lang.Object
com.diffplug.spotless.ProcessRunner.Result
Enclosing class:
ProcessRunner

public static class ProcessRunner.Result extends Object
  • Constructor Details

    • Result

      public Result(@Nonnull List<String> args, int exitCode, @Nonnull byte[] stdOut, @Nullable byte[] stdErr)
  • Method Details

    • args

      public List<String> args()
    • exitCode

      public int exitCode()
    • stdOut

      public byte[] stdOut()
    • stdErr

      public byte[] stdErr()
    • stdOutUtf8

      public String stdOutUtf8()
    • stdErrUtf8

      public String stdErrUtf8()
    • exitNotZero

      public boolean exitNotZero()
      Returns true if the exit code was not zero.
    • assertExitZero

      public String assertExitZero(Charset charset)
      Asserts that the exit code was zero, and if so, returns the content of stdout encoded with the given charset.

      If the exit code was not zero, throws an exception with useful debugging information.

    • toString

      public String toString()
      Overrides:
      toString in class Object