public class CSVDataRecordSourceReader
extends java.lang.Object
Writing this class to conveniently read a csv file. Using more and more csv files for configurations and various settings. This class easy extraction of data. Most methods are design to use column name(s) in the csv file and the File, VfsFile, or String path of csv file to extract data. Supposed to be easy.
| Constructor and Description |
|---|
CSVDataRecordSourceReader() |
| Modifier and Type | Method and Description |
|---|---|
java.util.List<java.lang.Object> |
readRecords(java.io.File f,
java.lang.String columnName)
Given a File object and the column name, this method returns a list
of records under that column in the csv file.
|
java.util.List<java.lang.Object> |
readRecords(java.lang.String filePath,
java.lang.String columnName)
Given a String path of the csv file and the column name, this method returns a list
of records under that column in the csv file.
|
java.util.List<java.lang.Object> |
readRecords(VfsFile vfsFile,
java.lang.String columnName)
Given a VfsFile object for the csv file and the column name, this method returns a list
of records under that column in the csv file.
|
Naming<java.lang.Object> |
readRecordsByColumnNames(java.io.File f,
java.util.List<java.lang.String> columnNames)
Given a File object and a list of column names, this method returns a
Naming object with "key" as the column name and value as a list of
records under that column in the csv file.
|
Naming<java.lang.Object> |
readRecordsByColumnNames(java.lang.String filePath,
java.util.List<java.lang.String> columnNames)
Given a String path for the csv file and a list of column names, this method returns a
Naming object with "key" as the column name and value as a list of
records under that column in the csv file.
|
Naming<java.lang.Object> |
readRecordsByColumnNames(VfsFile vfsFile,
java.util.List<java.lang.String> columnNames)
Given a VfsFile object for the csv file and a list of column names, this method returns a
Naming object with "key" as the column name and value as a list of
records under that column in the csv file.
|
public java.util.List<java.lang.Object> readRecords(java.lang.String filePath,
java.lang.String columnName)
String - filePathString - columnNamepublic java.util.List<java.lang.Object> readRecords(VfsFile vfsFile, java.lang.String columnName)
File - fString - columnNamepublic java.util.List<java.lang.Object> readRecords(java.io.File f,
java.lang.String columnName)
File - fString - columnNamepublic Naming<java.lang.Object> readRecordsByColumnNames(java.lang.String filePath, java.util.List<java.lang.String> columnNames)
String - filePathList - columnNamespublic Naming<java.lang.Object> readRecordsByColumnNames(VfsFile vfsFile, java.util.List<java.lang.String> columnNames)
VfsFile - vfsFileList - columnNamespublic Naming<java.lang.Object> readRecordsByColumnNames(java.io.File f, java.util.List<java.lang.String> columnNames)
File - fList - columnNames