common.io
Class ProcessExecutor.BufferingVisitor
java.lang.Object
common.io.ProcessExecutor.BufferingVisitor
- All Implemented Interfaces:
- ProcessExecutor.Visitor
- Enclosing class:
- ProcessExecutor
public static class ProcessExecutor.BufferingVisitor
- extends java.lang.Object
- implements ProcessExecutor.Visitor
A visitor that just buffers the output of the process and makes it
available for retrieval.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ProcessExecutor.BufferingVisitor
public ProcessExecutor.BufferingVisitor()
ProcessExecutor.BufferingVisitor
public ProcessExecutor.BufferingVisitor(ProcessExecutor.BufferingVisitor.Streams stream)
process
public boolean process(byte[] buf,
int len,
boolean isError)
- Description copied from interface:
ProcessExecutor.Visitor
- Called when data is read from the process output.
This method is called with buf set to null on EOF.
- Specified by:
process
in interface ProcessExecutor.Visitor
- Parameters:
buf
- Data from the output.len
- How much data in the buffer is valid.isError
- Whether data is from error output.
- Returns:
- Whether to continue reading the output.
getOutput
public byte[] getOutput()
getOutputString
public java.lang.String getOutputString()
getError
public byte[] getError()
getErrorString
public java.lang.String getErrorString()