public class FileCommandInput extends CommandInput
| Constructor and Description |
|---|
FileCommandInput(File inputFile)
Read input from a given file
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes and releases relevant resources.
|
String |
readLine()
Reads a single line from linput.
|
String |
readMaskedString(String prompt)
Reads input without echo'ing back keyboard input.
|
public FileCommandInput(File inputFile) throws FileNotFoundException
inputFile - Given input fileFileNotFoundException - Thrown when file doesn't existpublic void close()
throws IOException
CommandInputclose in class CommandInputIOExceptionpublic String readLine() throws IOException
CommandInputreadLine in class CommandInputIOExceptionpublic String readMaskedString(String prompt) throws IOException
CommandInputreadMaskedString in class CommandInputIOExceptionCopyright © 2008–2019. All rights reserved.