public class Input
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
protected static class |
Input.MaskingThread
This class attempts to erase characters echoed to the console.
|
Modifier and Type | Field and Description |
---|---|
private static java.util.logging.Logger |
LOGGER |
Modifier | Constructor and Description |
---|---|
private |
Input()
Private default constructor to hide the implicitly public one
|
Modifier and Type | Method and Description |
---|---|
protected static java.lang.String |
doRead(java.lang.String prompt,
boolean isPassword)
Prompt the user for input.
|
protected static java.lang.String |
read(java.lang.String prompt)
Prompt the user for input.
|
protected static java.lang.String |
read(java.lang.String prompt,
boolean isPassword)
Prompt the user for input.
|
protected static java.lang.String |
read(java.lang.String prompt,
boolean isPassword,
java.lang.String defaultInput)
Prompt the user for input.
|
protected static java.lang.String |
read(java.lang.String prompt,
java.lang.String defaultInput)
Prompt the user for input.
|
protected static boolean |
readBoolean(java.lang.String prompt,
java.lang.Boolean defaultInput)
Prompt the user for input.
|
protected static int |
readInteger(java.lang.String prompt,
java.lang.Integer defaultInput)
Prompt the user for input.
|
protected static java.lang.String[] |
readStrings(java.lang.String prompt,
java.lang.String defaultInput)
Prompt the user for multiple strings.
|
private Input()
protected static int readInteger(java.lang.String prompt, java.lang.Integer defaultInput) throws java.lang.Exception
prompt
- The prompt.defaultInput
- The default value to return if the client does not enter anything.java.lang.Exception
protected static boolean readBoolean(java.lang.String prompt, java.lang.Boolean defaultInput) throws java.lang.Exception
prompt
- The prompt.defaultInput
- The default value to return if the client does not enter anything.java.lang.Exception
protected static java.lang.String[] readStrings(java.lang.String prompt, java.lang.String defaultInput) throws java.lang.Exception
prompt
- The prompt.defaultInput
- The default value to return if the client does not enter anything.java.lang.Exception
protected static java.lang.String read(java.lang.String prompt) throws java.lang.Exception
prompt
- The prompt.java.lang.Exception
protected static java.lang.String read(java.lang.String prompt, java.lang.String defaultInput) throws java.lang.Exception
prompt
- The prompt.defaultInput
- The default value to return if the client does not enter anything.java.lang.Exception
protected static java.lang.String read(java.lang.String prompt, boolean isPassword) throws java.lang.Exception
prompt
- The prompt.isPassword
- True if the entered text should not appear on the console.java.lang.Exception
protected static java.lang.String read(java.lang.String prompt, boolean isPassword, java.lang.String defaultInput) throws java.lang.Exception
prompt
- The prompt.isPassword
- True if the entered text should not appear on the console.defaultInput
- The default value to return if the client does not enter anything.java.lang.Exception
protected static java.lang.String doRead(java.lang.String prompt, boolean isPassword) throws java.lang.Exception
prompt
- The prompt.isPassword
- True if the entered text should not appear on the console.java.lang.Exception