public class LineReader
extends java.lang.Object
Constructor and Description |
---|
LineReader(java.lang.String file,
java.lang.String delimiter)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes this LineReader.
|
java.lang.String[] |
getNextLine()
Returns next line of input file as an array of strings.
|
public LineReader(java.lang.String file, java.lang.String delimiter)
file
- path to file to read. For example,
"C:/project7/input.txt". Use forward slashes to
separate directories (folders) and don't forget the quotes.delimiter
- When reading lines, delimiter is used to parse the tokens.
For example, "," should be used for a comma-delimited file (like in
a thesaurus). " " should be used where spaces separate words (like
in an input file to be grammar-checked).public java.lang.String[] getNextLine()
public void close()