public class CSVParser extends java.lang.Object implements FileParser
Constructor and Description |
---|
CSVParser(int separator,
int enclosechar,
java.io.Reader reader)
creates CSVParser with specified separators
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Close the fileparser
|
boolean |
isreturnChar(int currentchar) |
boolean |
isWindowsParasite(int currentchar) |
java.lang.String[] |
parseOneLine() |
java.lang.String |
rebuildCSVLine(java.lang.String[] parsedline) |
public CSVParser(int separator, int enclosechar, java.io.Reader reader)
separator
- typically ',' or ';', the separator of fieldsenclosechar
- typically double quote '"', the field content may be
enclosed by enclosed char with escape through two enclose
chars,public boolean isreturnChar(int currentchar)
currentchar
- a characterpublic boolean isWindowsParasite(int currentchar)
currentchar
- a characterpublic java.lang.String[] parseOneLine() throws java.io.IOException
parseOneLine
in interface FileParser
java.io.IOException
public java.lang.String rebuildCSVLine(java.lang.String[] parsedline)
parsedline
- the elements as parsedpublic void close() throws java.io.IOException
FileParser
close
in interface FileParser
java.io.IOException