| |
|
| java.lang.Object net.sf.anupam.csv.CSVParser
CSVParser | public class CSVParser implements Iterable<Object>(Code) | | Parses CSV files and creates the mapped POJO objects. This is the primary
interface into the CSV parsing framework.
The class implements
Iterable Iterable interface and can be
used in the new Tiger for loops to iterate over all the CSV
records in the file.
Configuration of the parser is performed via the csv-mapping.xml
file. See the package description for more details.
Note that the class is not meant to be instantiated directly. Instead, the
CSVParserFactory CSVParserFactory factory should be
used for creation of instances.
author: Anupam Sengupta version: $Revision: 1.3 $ See Also: CSVParserFactory since: 1.5 |
Method Summary | |
protected void | finalize() Finalizes this parser and closes the reader. | public Iterator<Object> | iterator() Returns the iterator for retrieving the parsed POJO beans. | public String | toString() Dumps the root bean mapping configuration for this parser. |
CSVParser | public CSVParser(CSVBeanMapping rootBeanMapping, CSVReader reader)(Code) | | Constructor for CSVParser. The constructor accepts the bean mapping to
use as the starting CSV mapping configuration
(a.k.a the root bean mapping) and the CSV reader/parser engine
to use for actual parsing.
Parameters: rootBeanMapping - the bean mapping to use as the starting configuration Parameters: reader - the CSV Reader object which will actually parse the CSV file |
toString | public String toString()(Code) | | Dumps the root bean mapping configuration for this parser. This is meant
for debugging only.
the string representation of this parser See Also: Object.toString |
|
|
|