public class DefaultInputHandler extends Object implements InputHandler
| Constructor and Description |
|---|
DefaultInputHandler()
Empty no-arg constructor
|
| Modifier and Type | Method and Description |
|---|---|
protected InputStream |
getInputStream()
Returns the input stream from which the user input should be read.
|
protected String |
getPrompt(InputRequest request)
Constructs user prompt from a request.
|
void |
handleInput(InputRequest request)
Prompts and requests input.
|
protected InputStream getInputStream()
protected String getPrompt(InputRequest request)
This implementation adds (choice1,choice2,choice3,...) to the
prompt for MultipleChoiceInputRequests.
request - the request to construct the prompt for.
Must not be null.public void handleInput(InputRequest request) throws BuildException
handleInput in interface InputHandlerrequest - the request to handleBuildException - if not possible to read from console