public final class CsvConfiguration extends BaseObject implements Serializable
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_COLUMN_NAME_LINE |
static char |
DEFAULT_ESCAPE_CHAR |
static char |
DEFAULT_QUOTE_CHAR |
static char |
DEFAULT_SEPARATOR_CHAR |
static int |
NO_COLUMN_NAME_LINE |
static char |
NOT_A_CHAR
The value is '\\uFFFF', the "not a character" value which should not
occur in any valid Unicode string.
|
Constructor and Description |
---|
CsvConfiguration() |
CsvConfiguration(int columnNameLineNumber) |
CsvConfiguration(int columnNameLineNumber,
boolean failOnInconsistentRowLength,
boolean multilineValues) |
CsvConfiguration(int columnNameLineNumber,
String encoding,
char separatorChar,
char quoteChar,
char escapeChar) |
CsvConfiguration(int columnNameLineNumber,
String encoding,
char separatorChar,
char quoteChar,
char escapeChar,
boolean failOnInconsistentRowLength) |
CsvConfiguration(int columnNameLineNumber,
String encoding,
char separatorChar,
char quoteChar,
char escapeChar,
boolean failOnInconsistentRowLength,
boolean multilineValues) |
Modifier and Type | Method and Description |
---|---|
protected void |
decorateIdentity(List<Object> identifiers)
Subclasses should implement this method and add all fields to the list
that are to be included in equals(...) and hashCode() evaluation
|
int |
getColumnNameLineNumber()
The line number (1 based) from which to get the names of the columns.
|
String |
getEncoding()
Gets the file encoding to use for reading the file.
|
char |
getEscapeChar()
Gets the escape char, used for escaping eg.
|
char |
getQuoteChar()
Gets the quote char, used for encapsulating values.
|
char |
getSeparatorChar()
Gets the separator char (typically comma or semicolon) for separating
values.
|
boolean |
isFailOnInconsistentRowLength()
Determines whether to fail (by throwing an
InconsistentRowLengthException ) if a line in the CSV file has
inconsistent amounts of columns. |
boolean |
isMultilineValues()
Determines whether the CSV files read using this configuration should be
allowed to have multiline values in them.
|
String |
toString() |
classEquals, equals, hashCode
public static final char NOT_A_CHAR
public static final int NO_COLUMN_NAME_LINE
public static final int DEFAULT_COLUMN_NAME_LINE
public static final char DEFAULT_SEPARATOR_CHAR
public static final char DEFAULT_QUOTE_CHAR
public static final char DEFAULT_ESCAPE_CHAR
public CsvConfiguration()
public CsvConfiguration(int columnNameLineNumber)
public CsvConfiguration(int columnNameLineNumber, boolean failOnInconsistentRowLength, boolean multilineValues)
public CsvConfiguration(int columnNameLineNumber, String encoding, char separatorChar, char quoteChar, char escapeChar)
public CsvConfiguration(int columnNameLineNumber, String encoding, char separatorChar, char quoteChar, char escapeChar, boolean failOnInconsistentRowLength)
public CsvConfiguration(int columnNameLineNumber, String encoding, char separatorChar, char quoteChar, char escapeChar, boolean failOnInconsistentRowLength, boolean multilineValues)
public boolean isFailOnInconsistentRowLength()
InconsistentRowLengthException
) if a line in the CSV file has
inconsistent amounts of columns.
If set to false (default) MetaModel will gracefully fill in missing null
values in or ignore additional values in a line.public boolean isMultilineValues()
public int getColumnNameLineNumber()
public String getEncoding()
public char getSeparatorChar()
public char getQuoteChar()
public char getEscapeChar()
protected void decorateIdentity(List<Object> identifiers)
BaseObject
decorateIdentity
in class BaseObject
public String toString()
toString
in class BaseObject
Copyright © 2007–2015 The Apache Software Foundation. All rights reserved.