org.deegree.commons.dataaccess
Class CSVReader
java.lang.Object
java.io.Reader
java.io.BufferedReader
java.io.LineNumberReader
org.deegree.commons.dataaccess.CSVReader
- All Implemented Interfaces:
- Closeable, Readable
public class CSVReader
- extends LineNumberReader
The CSVReader
reads a csv file line by line. Note the regular expression for quotes may not work under
all circumstances, a Tokenizer might be a better solution.
- Version:
- $Revision: 18171 $, $Date: 2009-06-17 16:00:07 +0200 (Mi, 17 Jun 2009) $
- Author:
- Rutger Bezema, last edited by: $Author: mschneider $
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CSVReader
public CSVReader(Reader in,
String delimiter,
boolean firstLineContainsColumnNames)
- Parameters:
in
- delimiter
- firstLineContainsColumnNames
-
parseLine
public String[] parseLine()
throws IOException
- Returns:
- the values of the
- Throws:
IOException
getColumnsNames
public final String[] getColumnsNames()
- Returns:
- the values of the first row, which may be the column names or the first line of data.
getNumberOfColumns
public final int getNumberOfColumns()
- Returns:
- the numberOfColumns
getDelimiter
public final String getDelimiter()
- Returns:
- the delimiter
an open source project founded by lat/lon, Bonn, Germany.
For more information visit: http://www.deegree.org]]>