public abstract class CommandInput extends Object implements Closeable
| Constructor and Description |
|---|
CommandInput() |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
abstract String |
readLine()
Reads a single line from input.
|
abstract String |
readMaskedString(String prompt)
Reads input without echoing back keyboard input.
|
public void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableIOExceptionpublic abstract String readLine() throws IOException
IOException - allows any communication error.public abstract String readMaskedString(String prompt) throws IOException
prompt - The full or partial input that user types.IOException - allows any communication error.Copyright © 2008–2022. All rights reserved.