Package com.diffplug.spotless
Class ProcessRunner.Result
- java.lang.Object
-
- com.diffplug.spotless.ProcessRunner.Result
-
- Enclosing class:
- ProcessRunner
public static class ProcessRunner.Result extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description Result(java.util.List<java.lang.String> args, int exitCode, byte[] stdOut, byte[] stdErr)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<java.lang.String>
args()
java.lang.String
assertExitZero(java.nio.charset.Charset charset)
Asserts that the exit code was zero, and if so, returns the content of stdout encoded with the given charset.int
exitCode()
boolean
exitNotZero()
Returns true if the exit code was not zero.byte[]
stdErr()
java.lang.String
stdErrUtf8()
byte[]
stdOut()
java.lang.String
stdOutUtf8()
java.lang.String
toString()
-
-
-
Method Detail
-
args
public java.util.List<java.lang.String> args()
-
exitCode
public int exitCode()
-
stdOut
public byte[] stdOut()
-
stdErr
public byte[] stdErr()
-
stdOutUtf8
public java.lang.String stdOutUtf8()
-
stdErrUtf8
public java.lang.String stdErrUtf8()
-
exitNotZero
public boolean exitNotZero()
Returns true if the exit code was not zero.
-
assertExitZero
public java.lang.String assertExitZero(java.nio.charset.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 java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-