public class CSVReader extends Object
| Modifier and Type | Field and Description |
|---|---|
List<String> |
header |
List<String> |
lines |
Map<Integer,List<String>> |
rows |
| Constructor and Description |
|---|
CSVReader() |
CSVReader(String filename) |
CSVReader(String filename,
String delimiter) |
CSVReader(String filename,
String delimiter,
String charset)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
String |
getDescription()
Description of the CSVReader, reports its configuration f.e.
|
String |
getElement(int r,
int c)
Returns the element at the given row and column.
|
Map<Integer,List<String>> |
getValues(String filename) |
Map<Integer,List<String>> |
getValues(String filename,
String delimiter) |
Map<Integer,List<String>> |
getValues(String filename,
String delimiter,
String charset)
Map to use in a taglib function.
|
void |
readCSV(String filename,
String delimiter,
String charset)
Reads the contents of the CSV file.
|
int |
size()
Returns the number of rows in the CVS file.
|
public CSVReader(String filename)
public CSVReader()
public void readCSV(String filename, String delimiter, String charset)
filename - CSV filedelimiter - the komma or something else TODO!charset - by default UTF-8public String getElement(int r, int c)
r - the element rowc - the element columnpublic Map<Integer,List<String>> getValues(String filename, String delimiter, String charset)
readCSV(java.lang.String, java.lang.String, java.lang.String) and returns csv-file rows.filename - CSV filepublic int size()
public String getDescription()
MMBase 1.9-SNAPSHOT - ${javadoctimestamp}