GreedyInputHandler (Apache Ant API)
Description: declaration: package: org.apache.tools.ant.input, class: GreedyInputHandler

# Class GreedyInputHandler

java.lang.Object
org.apache.tools.ant.input.DefaultInputHandler
org.apache.tools.ant.input.GreedyInputHandler

All Implemented Interfaces:
  `InputHandler`

public class GreedyInputHandler extends DefaultInputHandler
Prompts on System.err, reads input from System.in until EOF

Since:
  Ant 1.7

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `GreedyInputHandler()`
  Empty no-arg constructor

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `handleInput(InputRequest request)`
  Prompts and requests input.

  ### Methods inherited from class DefaultInputHandler

  `getInputStream, getPrompt`
  Modifier and Type
  Method
  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.

  ### Methods inherited from class Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### GreedyInputHandler

    public GreedyInputHandler()
    Empty no-arg constructor

- ## Method Details

  - ### handleInput

    public void handleInput(InputRequest request) throws BuildException
    Prompts and requests input.
    Specified by:
      `handleInput` in interface `InputHandler`
    Overrides:
      `handleInput` in class `DefaultInputHandler`
    Parameters:
      `request` - the request to handle
    Throws:
      `BuildException` - if not possible to read from console, or if input is invalid.