public static final class BaseProcessOutputHandler.BaseProcessOutput extends java.lang.Object implements ProcessOutput
| Constructor and Description |
|---|
BaseProcessOutput() |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
com.google.common.io.FileBackedOutputStream |
getErrorOutput()
Returns the OutputStream to use for the error output
|
java.lang.String |
getErrorOutputAsString()
Return the process error output as a String.
|
com.google.common.io.FileBackedOutputStream |
getStandardOutput()
Returns the OutputStream to use for the standard output
|
java.io.Reader |
getStandardOutputAsReader() |
java.lang.String |
getStandardOutputAsString()
Return the process output as a String.
|
<T> T |
processErrorOutputLines(com.google.common.io.LineProcessor<T> lineProcessor) |
<T> T |
processStandardOutputLines(com.google.common.io.LineProcessor<T> lineProcessor)
Process each output line using an implementation of
LineProcessor. |
@NonNull public com.google.common.io.FileBackedOutputStream getStandardOutput()
ProcessOutputgetStandardOutput in interface ProcessOutput@NonNull public com.google.common.io.FileBackedOutputStream getErrorOutput()
ProcessOutputgetErrorOutput in interface ProcessOutputpublic void close()
throws java.io.IOException
close in interface java.io.Closeableclose in interface java.lang.AutoCloseablejava.io.IOException@Nullable
public <T> T processErrorOutputLines(@NonNull
com.google.common.io.LineProcessor<T> lineProcessor)
throws ProcessException
ProcessException@Nullable
public <T> T processStandardOutputLines(@NonNull
com.google.common.io.LineProcessor<T> lineProcessor)
throws ProcessException
LineProcessor.T - the expected result from the line processor (once it has processed part of or
the entire output of the process)lineProcessor - a processor for a line of output.ProcessExceptionpublic java.io.Reader getStandardOutputAsReader()
throws java.io.IOException
java.io.IOException@NonNull
public java.lang.String getStandardOutputAsString()
throws ProcessException
ProcessException@NonNull
public java.lang.String getErrorOutputAsString()
throws ProcessException
ProcessException