org.codehaus.plexus.components.interactivity

Interface InputHandler

public interface InputHandler

Manage user input from different sources.

Version: $Id: InputHandler.java 2649 2005-10-10 16:51:51Z brett $

Author: Brett Porter

UNKNOWN: should this also echo any prompts before the input? should this validate the input, reprompt if required? readBoolean, readInt, readSingleChar - readLine's that parse the input

Field Summary
StringROLE
Method Summary
StringreadLine()
Read a single line of input, swalling the newline at the end.
ListreadMultipleLines()
Read a set of lines.
StringreadPassword()
Read a single line of input, swalling the newline at the end.

Field Detail

ROLE

public String ROLE

Method Detail

readLine

public String readLine()
Read a single line of input, swalling the newline at the end. If the input can be echoed, it will be.

Returns: the line read

readMultipleLines

public List readMultipleLines()
Read a set of lines. Equivalent to multiple calls to {@link #readLine()}. Ends when an empty line is encountered.

Returns: a list of lines read

readPassword

public String readPassword()
Read a single line of input, swalling the newline at the end. This method guarantees input is not echoed.

Returns: the line read