public abstract class CsvConverter extends Proc
This class converts CSV input to XML.
Modifier and Type | Field and Description |
---|---|
protected boolean |
ats
Attributes format.
|
protected int |
col
Current column.
|
static byte[] |
CSV
CSV token.
|
static byte[] |
ENTRY
CSV token.
|
protected TokenList |
headers
Headers.
|
protected boolean |
lax
Lax QName conversion.
|
static byte[] |
NAME
CSV token.
|
protected NewlineInput |
nli
Current input.
|
static byte[] |
RECORD
CSV token.
|
Modifier | Constructor and Description |
---|---|
protected |
CsvConverter(CsvParserOptions copts)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
Item |
convert(IO input)
Converts the specified input to XML.
|
protected abstract void |
entry(byte[] value)
Called when an entry is encountered.
|
protected abstract Item |
finish()
Returns the resulting byte array.
|
static CsvConverter |
get(CsvParserOptions copts)
Returns a CSV converter for the given configuration.
|
protected abstract void |
header(byte[] string)
Adds a new header.
|
protected abstract void |
record()
Adds a new record.
|
abort, checkStop, databases, det, detail, listen, proc, prog, progress, registered, registered, startTimeout, stop, stopTimeout, tit, title
public static final byte[] CSV
public static final byte[] RECORD
public static final byte[] ENTRY
public static final byte[] NAME
protected final TokenList headers
protected final boolean ats
protected final boolean lax
protected int col
protected NewlineInput nli
protected CsvConverter(CsvParserOptions copts)
copts
- json optionspublic Item convert(IO input) throws IOException
input
- inputIOException
- I/O exceptionpublic static CsvConverter get(CsvParserOptions copts)
copts
- optionsprotected abstract void header(byte[] string)
string
- stringprotected abstract void record() throws IOException
IOException
- I/O exceptionprotected abstract void entry(byte[] value) throws IOException
value
- stringIOException
- I/O exceptionprotected abstract Item finish() throws IOException
IOException
- I/O exceptionCopyright © 2005–2015 BaseX Team. All rights reserved.