public final class CSVParser extends SingleParser
The parser provides some options, which can be specified via
SET PARSEROPT ...:
separator defines the column separator, which can be
comma, semicolon, or tab
(default: comma).header specifies if the input file contains a header.
Can be set to yes or no
(default: yes)format specifies the XML format, which can be
simple or verbose
(default: verbose).All options are separated by commas, and the keys and values are separated by equality sign (=).
Example:
SET PARSEROPT separator=tab,format=simple,header=no; CREATE DB ...
Description: Use tabs as separator, choose simple XML format,
and indicate that the file contains no header.
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String[] |
FORMATS
Formats.
|
static java.lang.String[] |
SEPARATORS
Separators.
|
builder| Constructor and Description |
|---|
CSVParser(IO source,
Prop pr)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
parse()
Parses the current input.
|
builder, parseclose, emptyParser, info, item, singleParser, target, xmlParserpublic static final java.lang.String[] SEPARATORS
public static final java.lang.String[] FORMATS
public void parse()
throws java.io.IOException
SingleParserparse in class SingleParserjava.io.IOException - I/O exception