public class FileInputHandler extends InputHandler
InputHandler.InputType
alreadyClosed, 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 |
putNext
public FileInputHandler(StreamingCommand.HandleSpec handleSpec) throws ExecException
ExecException
public InputHandler.InputType getInputType()
InputHandler
InputType
getInputType
in class InputHandler
InputType
public void bindTo(OutputStream os) throws IOException
InputHandler
InputHandler
to the OutputStream
from which it reads input and sends it to the managed process.bindTo
in class InputHandler
os
- OutputStream
from which to read input data for the
managed processIOException
public void close(Process process) throws IOException
InputHandler
InputHandler
since there is no more input
to be sent to the managed process.close
in class InputHandler
process
- 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.IOException
Copyright © 2007-2017 The Apache Software Foundation