java.lang.Objectorg.objectweb.telosys.dal.csv.CSVReader
A "SAX like" parser to process CSV files.
As the content is parsed by the underlying parser, methods of the given Handler are called.
Constructor Summary | |
CSVReader(char cSepar,
ICSVHandler handler)
Construct a CSVReader object initialized with a separator and a handler |
|
CSVReader(java.lang.String sSepar,
ICSVHandler handler)
Construct a CSVReader object initialized with a separator and a handler |
Method Summary | |
void |
parse(java.io.BufferedReader br)
Parse the input specified, using the current Handler. |
void |
parse(java.lang.String sFileName)
Parse the content of the file specified, using the current Handler. |
void |
setComment(java.lang.String sComment)
Set the comment string |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public CSVReader(char cSepar, ICSVHandler handler)
cSepar
- -
the field separatorhandler
- -
the CSV handler to usepublic CSVReader(java.lang.String sSepar, ICSVHandler handler)
sSepar
- -
the field separator (use only the first character of the string)handler
- -
the CSV handler to useMethod Detail |
public void setComment(java.lang.String sComment)
sComment
- -
the string which identify a commentpublic void parse(java.lang.String sFileName) throws java.io.FileNotFoundException, java.io.IOException
sFileName
- -
the name of the file to parse
java.io.FileNotFoundException
java.io.IOException
public void parse(java.io.BufferedReader br) throws java.io.IOException
br
- -
the BufferedReader to parse
java.io.FileNotFoundException
java.io.IOException