org.codehaus.plexus.components.interactivity

Class DefaultInputHandler

Implemented Interfaces:
Disposable, Initializable, InputHandler

public class DefaultInputHandler
extends AbstractInputHandler
implements Initializable, Disposable

Default input handler, that uses the console.
Version:
$Id: DefaultInputHandler.java 2649 2005-10-10 16:51:51Z brett $
Author:
Brett Porter

Fields inherited from interface org.codehaus.plexus.components.interactivity.InputHandler

ROLE

Method Summary

void
dispose()
void
initialize()
String
readLine()
Read a single line of input, swalling the newline at the end.
String
readPassword()
Read a single line of input, swalling the newline at the end.

Methods inherited from class org.codehaus.plexus.components.interactivity.AbstractInputHandler

readMultipleLines

Method Details

dispose

public void dispose()

initialize

public void initialize()
            throws InitializationException

readLine

public String readLine()
            throws IOException
Read a single line of input, swalling the newline at the end. If the input can be echoed, it will be.
Specified by:
readLine in interface InputHandler
Returns:
the line read

readPassword

public String readPassword()
            throws IOException
Read a single line of input, swalling the newline at the end. This method guarantees input is not echoed.
Specified by:
readPassword in interface InputHandler
Returns:
the line read