|
CSVObjects Framework | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sf.anupam.csv.CSVReader
class CSVReader
Reads a CSV file and parses the individual fields for each CSV record in the
file. The default delimiter is assumed to be the , (comma).
CSVParse| Constructor Summary | |
|---|---|
CSVReader(Reader csvReader,
boolean headerPresent)
Constructor which accepts a reader on the CSV stream to parse. |
|
| Method Summary | |
|---|---|
void |
close()
Releases all system resources. |
protected void |
finalize()
Finalizes this CSV reader and closes the IO connections. |
protected CSVParse |
getParser()
Returns the internal CSV parser engine instance for this reader. |
boolean |
isHeaderPresent()
Indicates whether the header row is present or not. |
boolean |
isReadingComplete()
Indicates whether the reader has read all CSV lines. |
Iterator<List<String>> |
iterator()
Returns an iterator over the parsed lines. |
protected void |
readingIsComplete()
Sets the flag to denote that all lines have been read. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public CSVReader(Reader csvReader,
boolean headerPresent)
csvReader - the CSV stream reader from which to parseheaderPresent - indicates whether the CSV stream has a header record| Method Detail |
|---|
public void close()
protected void finalize()
throws Throwable
finalize in class ObjectThrowable - thrown if the finalization fails.Object.finalize()public Iterator<List<String>> iterator()
iterator in interface Iterable<List<String>>public boolean isHeaderPresent()
true if the header row is presentpublic boolean isReadingComplete()
true if all CSV lines have been readprotected void readingIsComplete()
protected CSVParse getParser()
|
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||