## org.apache.tools.ant.input
Class DefaultInputHandler

    java.lang.Object
      |
      +--org.apache.tools.ant.input.DefaultInputHandler

All Implemented Interfaces:
  InputHandler

public class DefaultInputHandler
extends java.lang.Object
implements InputHandler

Prompts on System.err, reads input from System.in

Since:
  Ant 1.5
Version:
  $Revision: 1.1.2.2 $
Author:
  Stefan Bodewig

Constructor Summary
`DefaultInputHandler()` Empty no-arg constructor

Method Summary
`protected java.io.InputStream` `getInputStream()` Returns the input stream from which the user input should be read.
`protected java.lang.String` `getPrompt(InputRequest request)` Constructs user prompt from a request.
`void` `handleInput(InputRequest request)` Prompts and requests input.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### DefaultInputHandler

    public DefaultInputHandler()

  Empty no-arg constructor

Method Detail

### handleInput

    public void handleInput(InputRequest request)
                     throws BuildException

  Prompts and requests input. May loop until a valid input has been entered.

  Specified by:
    `handleInput` in interface `InputHandler`
    `BuildException`

### getPrompt

    protected java.lang.String getPrompt(InputRequest request)

  Constructs user prompt from a request.

  This implementation adds (choice1,choice2,choice3,...) to the prompt for `MultipleChoiceInputRequest`s.

  Parameters:
    `request` - the request to construct the prompt for. Must not be `null`.

### getInputStream

    protected java.io.InputStream getInputStream()

  Returns the input stream from which the user input should be read.

Copyright © 2000-2003 Apache Software Foundation. All Rights Reserved.