Modifier and Type | Field and Description |
---|---|
protected ArrayList<CsvSchema.Column> |
_columns |
protected char |
_columnSeparator |
protected int |
_escapeChar |
protected char[] |
_lineSeparator |
protected char |
_quoteChar |
protected boolean |
_skipFirstDataRow |
protected boolean |
_useHeader |
Constructor and Description |
---|
CsvSchema.Builder() |
CsvSchema.Builder(CsvSchema src)
"Copy" constructor which creates builder that has settings of
given source schema
|
Modifier and Type | Method and Description |
---|---|
protected void |
_checkIndex(int index) |
CsvSchema.Builder |
addColumn(CsvSchema.Column c) |
CsvSchema.Builder |
addColumn(String name) |
CsvSchema.Builder |
addColumn(String name,
CsvSchema.ColumnType type) |
CsvSchema |
build() |
CsvSchema.Builder |
clearColumns() |
CsvSchema.Builder |
disableEscapeChar()
Method for specifying that no escape character is to be used
with CSV documents this schema defines.
|
Iterator<CsvSchema.Column> |
getColumns() |
void |
renameColumn(int index,
String newName) |
void |
replaceColumn(int index,
CsvSchema.Column c) |
CsvSchema.Builder |
setColumnSeparator(char c)
Method for specifying character used to separate column
values.
|
void |
setColumnType(int index,
CsvSchema.ColumnType type) |
CsvSchema.Builder |
setEscapeChar(char c)
Method for specifying character used for optional escaping
of characters in quoted String values.
|
CsvSchema.Builder |
setLineSeparator(char lf) |
CsvSchema.Builder |
setLineSeparator(String lf) |
CsvSchema.Builder |
setQuoteChar(char c)
Method for specifying character used for optional quoting
of values.
|
CsvSchema.Builder |
setSkipFirstDataRow(boolean b) |
CsvSchema.Builder |
setUseHeader(boolean b)
Method for specifying whether Schema should indicate that
a header line (first row that contains column names) is to be
used for reading and writing or not.
|
int |
size() |
protected final ArrayList<CsvSchema.Column> _columns
protected boolean _useHeader
protected boolean _skipFirstDataRow
protected char _columnSeparator
protected char _quoteChar
protected int _escapeChar
protected char[] _lineSeparator
public CsvSchema.Builder()
public CsvSchema.Builder(CsvSchema src)
public CsvSchema.Builder addColumn(String name)
public CsvSchema.Builder addColumn(String name, CsvSchema.ColumnType type)
public CsvSchema.Builder addColumn(CsvSchema.Column c)
public void replaceColumn(int index, CsvSchema.Column c)
public void renameColumn(int index, String newName)
public void setColumnType(int index, CsvSchema.ColumnType type)
public CsvSchema.Builder clearColumns()
public int size()
public Iterator<CsvSchema.Column> getColumns()
public CsvSchema.Builder setUseHeader(boolean b)
public CsvSchema.Builder setSkipFirstDataRow(boolean b)
public CsvSchema.Builder setColumnSeparator(char c)
public CsvSchema.Builder setQuoteChar(char c)
public CsvSchema.Builder setEscapeChar(char c)
public CsvSchema.Builder disableEscapeChar()
public CsvSchema.Builder setLineSeparator(String lf)
public CsvSchema.Builder setLineSeparator(char lf)
public CsvSchema build()
protected void _checkIndex(int index)
Copyright © 2012-2013 FasterXML. All Rights Reserved.