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: 28683 $, $Date: 2010-12-10 11:37:25 +0100 (Fri, 10 Dec 2010) $
- Author:
- Rutger Bezema, last edited by: $Author: aschmitz $
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
Copyright © 2011. All Rights Reserved.