public class InputStreamCommandInput extends CommandInput
CommandInput with an input stream| Constructor and Description |
|---|
InputStreamCommandInput(InputStream in) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
String |
readLine()
Reads a single line from input.
|
String |
readMaskedString(String prompt)
Reads input without echoing back keyboard input.
|
public InputStreamCommandInput(InputStream in)
in - Given input streampublic String readLine() throws IOException
CommandInputreadLine in class CommandInputIOException - allows any communication error.public String readMaskedString(String prompt) throws IOException
CommandInputreadMaskedString in class CommandInputprompt - The full or partial input that user types.IOException - allows any communication error.public void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in class CommandInputIOExceptionCopyright © 2008–2022. All rights reserved.