接口 InputHandler
-
- 所有已知实现类:
AbstractInputHandler
,DefaultInputHandler
public interface InputHandler
Manage user input from different sources.- 版本:
- $Id: InputHandler.java 2649 2005-10-10 16:51:51Z brett $
- 作者:
- Brett Porter
-
-
字段概要
字段 修饰符和类型 字段 说明 static java.lang.String
ROLE
-
方法概要
所有方法 实例方法 抽象方法 修饰符和类型 方法 说明 java.lang.String
readLine()
Read a single line of input, swalling the newline at the end.java.util.List
readMultipleLines()
Read a set of lines.java.lang.String
readPassword()
Read a single line of input, swalling the newline at the end.
-
-
-
方法详细资料
-
readLine
java.lang.String readLine() throws java.io.IOException
Read a single line of input, swalling the newline at the end. If the input can be echoed, it will be.- 返回:
- the line read
- 抛出:
java.io.IOException
-
readPassword
java.lang.String readPassword() throws java.io.IOException
Read a single line of input, swalling the newline at the end. This method guarantees input is not echoed.- 返回:
- the line read
- 抛出:
java.io.IOException
-
readMultipleLines
java.util.List readMultipleLines() throws java.io.IOException
Read a set of lines. Equivalent to multiple calls toreadLine()
. Ends when an empty line is encountered.- 返回:
- a list of lines read
- 抛出:
java.io.IOException
-
-