Package org.anchoranalysis.io.input.csv
Class CSVReaderByLine
Object
CSVReaderByLine
Reads a CSV file line-by-line.
This is a helpful class that quickly processes a CSV file without having to directly interact
with CSVReader
.
- Author:
- Owen Feehan
-
Method Summary
Modifier and TypeMethodDescriptionstatic ReadByLine
Opens a CSV file for reading.static ReadByLine
Opens a CSV file for reading.static ReadByLine
open
(Path filePath, String regularExpressionSeperator, boolean firstLineHeaders, boolean quotedStrings) Opens a CSV file for reading.
-
Method Details
-
open
Opens a CSV file for reading.- Parameters:
filePath
- the path of the CSV file that will be opened.- Returns:
- a reader opened on
filePath
.
-
open
public static ReadByLine open(Path filePath, String regularExpressionSeperator, boolean firstLineHeaders) Opens a CSV file for reading.- Parameters:
filePath
- the path of the CSV file that will be opened.regularExpressionSeperator
- a regular-expression in Java syntax for splitting a line by separator.firstLineHeaders
- whether the first line of the CSV file contains headers or not.- Returns:
- a reader opened on
filePath
.
-
open
public static ReadByLine open(Path filePath, String regularExpressionSeperator, boolean firstLineHeaders, boolean quotedStrings) Opens a CSV file for reading.- Parameters:
filePath
- the path of the CSV file that will be opened.regularExpressionSeperator
- a regular-expression in Java syntax for splitting a line by separator.firstLineHeaders
- whether the first line of the CSV file contains headers or not.quotedStrings
- whether strings should be quoted or not in the CSV file.- Returns:
- a reader opened on
filePath
.
-