public class CSVReader extends AbstractDataReader
This class CSVReader implements default behavior of the DataReader interface. This class reads in the data source information from the configuration, loads the csv file data.
This class is invoked by initDataReaderConfig method in BusinessObjectLoader individual methods:
Before you call read(), you can call other methods to get and set additional properties if these properties are not defined in the configuration file or you want to override the value in the configuration file. To get and set configuration properties, you can call:
Constructor and Description |
---|
CSVReader() |
Modifier and Type | Method and Description |
---|---|
void | close()
Close the data source used for reading data.
|
java.io.File | getDataFile()
This method gets the CSV File name and then creates a File object for that particular CSV input file.
|
java.lang.Integer | getSourcePosition()
It returns the line number in the CSV file when the last next() method is called.
|
void | init()
It gets the input csv data file for a DataReader and gets limeDelimiter, tokenDelimeter and tokenValueDelimiter values.
|
java.lang.Object | next()
Reads a line from lineReader, tokenize the line and return a map of tokeninzed data for the line.
|
public void init() throws DataLoadException
public java.io.File getDataFile() throws DataLoadException
public java.lang.Object next() throws DataLoadException
public java.lang.Integer getSourcePosition()
public void close() throws DataLoadException
Close the data source used for reading data.