public class FileInputHandler extends InputHandler
InputHandler.InputTypealreadyClosed, serializer| Constructor and Description |
|---|
FileInputHandler(StreamingCommand.HandleSpec handleSpec) |
| Modifier and Type | Method and Description |
|---|---|
void |
bindTo(OutputStream os)
Bind the
InputHandler to the OutputStream
from which it reads input and sends it to the managed process. |
void |
close(Process process)
Close the
InputHandler since there is no more input
to be sent to the managed process. |
InputHandler.InputType |
getInputType()
Get the handled
InputType |
putNextpublic FileInputHandler(StreamingCommand.HandleSpec handleSpec) throws ExecException
ExecExceptionpublic InputHandler.InputType getInputType()
InputHandlerInputTypegetInputType in class InputHandlerInputTypepublic void bindTo(OutputStream os) throws IOException
InputHandlerInputHandler to the OutputStream
from which it reads input and sends it to the managed process.bindTo in class InputHandleros - OutputStream from which to read input data for the
managed processIOExceptionpublic void close(Process process) throws IOException
InputHandlerInputHandler since there is no more input
to be sent to the managed process.close in class InputHandlerprocess - the managed process - this could be null in some cases
like when input is through files. In that case, the process would not
have been exec'ed yet - if this method if overridden it is the responsibility
of the implementer to check that the process is usable. The managed process
object is supplied by the ExecutableManager to this call so that this method
can check if the process is alive if it needs to know.IOExceptionCopyright © 2007-2017 The Apache Software Foundation