public class FileInputHandler extends InputHandler
InputHandler.InputType
alreadyClosed, serializer
Constructor and Description |
---|
FileInputHandler(StreamingCommand.HandleSpec handleSpec) |
Modifier and Type | Method and Description |
---|---|
void |
bindTo(java.io.OutputStream os)
Bind the
InputHandler to the OutputStream
from which it reads input and sends it to the managed process. |
void |
close(java.lang.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(java.io.OutputStream os) throws java.io.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 processjava.io.IOException
public void close(java.lang.Process process) throws java.io.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.java.io.IOException
Copyright © 2007-2012 The Apache Software Foundation