|
CSVObjects Framework | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.anupam.csv.CSVParser
public class CSVParser
Parses CSV files and creates the mapped POJO objects. This is the primary interface into the CSV parsing framework.
The class implementsIterable
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
factory should be
used for creation of instances.
CSVParserFactory
Constructor Summary | |
---|---|
CSVParser(CSVBeanMapping rootBeanMapping,
CSVReader reader)
Constructor for CSVParser. |
Method Summary | |
---|---|
protected void |
finalize()
Finalizes this parser and closes the reader. |
Iterator<Object> |
iterator()
Returns the iterator for retrieving the parsed POJO beans. |
String |
toString()
Dumps the root bean mapping configuration for this parser. |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public CSVParser(CSVBeanMapping rootBeanMapping, CSVReader reader)
rootBeanMapping
- the bean mapping to use as the starting configurationreader
- the CSV Reader object which will actually parse the CSV fileMethod Detail |
---|
public String toString()
toString
in class Object
Object.toString()
protected void finalize() throws Throwable
finalize
in class Object
Throwable
- thrown if the finalization failsObject.finalize()
public Iterator<Object> iterator()
iterator
in interface Iterable<Object>
Iterable.iterator()
|
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |