Note
in Jackson 2.x this was named CsvParser.Feature.
| Modifier and Type | Field and Description |
|---|---|
| private final boolean | |
| private final int | |
| public static final CsvReadFeature | ALLOW_COMMENTS
Feature that allows accepting "hash comments" by default, similar to
|
| public static final CsvReadFeature | ALLOW_TRAILING_COMMA
Feature that allows there to be a trailing single extraneous data column that is empty. |
| public static final CsvReadFeature | EMPTY_STRING_AS_NULL
Feature that enables coercing an empty |
| public static final CsvReadFeature | EMPTY_UNQUOTED_STRING_AS_NULL
Feature that enables coercing an empty un-quoted |
| public static final CsvReadFeature | FAIL_ON_MISSING_COLUMNS
Feature that allows failing (with a |
| public static final CsvReadFeature | FAIL_ON_MISSING_HEADER_COLUMNS
Feature that allows failing (with a |
| public static final CsvReadFeature | IGNORE_TRAILING_UNMAPPABLE
Feature that allows ignoring of unmappable "extra" columns; that is, values for columns that appear after columns for which types are defined. |
| public static final CsvReadFeature | INSERT_NULLS_FOR_MISSING_COLUMNS
Feature that allows "inserting" virtual key / `null` value pairs in case a row contains fewer columns than declared by configured schema. |
| public static final CsvReadFeature | SKIP_EMPTY_LINES
Feature that allows skipping input lines that are completely empty or blank (composed only of whitespace), instead of being decoded as lines of just a single column with an empty/blank String value (or, depending on binding, `null`). |
| public static final CsvReadFeature | TRIM_HEADER_SPACES
Feature determines whether spaces around separator characters (commas) in header line entries (header names) are to be automatically trimmed before being reported or not. |
| public static final CsvReadFeature | TRIM_SPACES
Feature determines whether spaces around separator characters (commas) are to be automatically trimmed before being reported or not. |
| public static final CsvReadFeature | WRAP_AS_ARRAY
Feature that determines how stream of records (usually CSV lines, but sometimes multiple lines when line-feeds are included in quoted values) is exposed: either as a sequence of Objects (false), or as an Array of Objects (true). |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static int | collectDefaults()
Method that calculates bit set (flags) of all features that are enabled by default. |
| public boolean | enabledByDefault()
Implements tools. Accessor for checking whether this feature is enabled by default. |
| public boolean | enabledIn(int flags)
Implements tools. Convenience method for checking whether feature is enabled in given bitmask. |
| public int | getMask()
Implements tools. Returns bit mask for this feature instance; must be a single bit,
that is of form |
| public static CsvReadFeature | |
| public static CsvReadFeature[] |
| _defaultState | back to summary |
|---|---|
| private final boolean _defaultState | |
| _mask | back to summary |
|---|---|
| private final int _mask | |
| ALLOW_COMMENTS | back to summary |
|---|---|
| public static final CsvReadFeature ALLOW_COMMENTS Feature that allows accepting "hash comments" by default, similar to
| |
| ALLOW_TRAILING_COMMA | back to summary |
|---|---|
| public static final CsvReadFeature ALLOW_TRAILING_COMMA Feature that allows there to be a trailing single extraneous data column that is empty. When this feature is disabled, any extraneous column, regardless of content will cause an exception to be thrown. Disabling this feature is only useful when IGNORE_TRAILING_UNMAPPABLE is also disabled. | |
| EMPTY_STRING_AS_NULL | back to summary |
|---|---|
| public static final CsvReadFeature EMPTY_STRING_AS_NULL Feature that enables coercing an empty
Note that if this setting is enabled, | |
| EMPTY_UNQUOTED_STRING_AS_NULL | back to summary |
|---|---|
| public static final CsvReadFeature EMPTY_UNQUOTED_STRING_AS_NULL Feature that enables coercing an empty un-quoted
Note that this feature is only considered if
Feature is disabled by default for backwards compatibility. | |
| FAIL_ON_MISSING_COLUMNS | back to summary |
|---|---|
| public static final CsvReadFeature FAIL_ON_MISSING_COLUMNS Feature that allows failing (with a
Note that this feature has precedence over Feature is disabled by default. | |
| FAIL_ON_MISSING_HEADER_COLUMNS | back to summary |
|---|---|
| public static final CsvReadFeature FAIL_ON_MISSING_HEADER_COLUMNS Feature that allows failing (with a Feature is enabled by default. | |
| IGNORE_TRAILING_UNMAPPABLE | back to summary |
|---|---|
| public static final CsvReadFeature IGNORE_TRAILING_UNMAPPABLE Feature that allows ignoring of unmappable "extra" columns; that is, values for columns that appear after columns for which types are defined. When disabled, an exception is thrown for such column values, but if enabled, they are silently ignored. Feature is disabled by default. | |
| INSERT_NULLS_FOR_MISSING_COLUMNS | back to summary |
|---|---|
| public static final CsvReadFeature INSERT_NULLS_FOR_MISSING_COLUMNS Feature that allows "inserting" virtual key / `null` value pairs in case a row contains fewer columns than declared by configured schema. This typically has the effect of forcing an explicit `null` assigment (or corresponding "null value", if so configured) at databinding level. If disabled, no extra work is done and values for "missing" columns are not exposed as part of the token stream.
Note that this feature is only considered if
Feature is disabled by default. | |
| SKIP_EMPTY_LINES | back to summary |
|---|---|
| public static final CsvReadFeature SKIP_EMPTY_LINES Feature that allows skipping input lines that are completely empty or blank (composed only of whitespace), instead of being decoded as lines of just a single column with an empty/blank String value (or, depending on binding, `null`). Feature is disabled by default. | |
| TRIM_HEADER_SPACES | back to summary |
|---|---|
| public static final CsvReadFeature TRIM_HEADER_SPACES Feature determines whether spaces around separator characters (commas) in header line entries (header names) are to be automatically trimmed before being reported or not. Note that this does NOT force trimming of possible white space from within double-quoted values, but only those surrounding unquoted values (white space outside of double-quotes is never included regardless of trimming).
Default value is | |
| TRIM_SPACES | back to summary |
|---|---|
| public static final CsvReadFeature TRIM_SPACES Feature determines whether spaces around separator characters (commas) are to be automatically trimmed before being reported or not. Note that this does NOT force trimming of possible white space from within double-quoted values, but only those surrounding unquoted values (white space outside of double-quotes is never included regardless of trimming). Default value is false, as per RFC-4180. | |
| WRAP_AS_ARRAY | back to summary |
|---|---|
| public static final CsvReadFeature WRAP_AS_ARRAY Feature that determines how stream of records (usually CSV lines, but sometimes
multiple lines when line-feeds are included in quoted values) is exposed:
either as a sequence of Objects (false), or as an Array of Objects (true).
Using stream of Objects is convenient when using
Default value is false, meaning that by default a CSV document is exposed as a sequence of root-level Object entries. | |
| CsvReadFeature | back to summary |
|---|---|
| private CsvReadFeature(boolean defaultState) | |
| collectDefaults | back to summary |
|---|---|
| public static int collectDefaults() Method that calculates bit set (flags) of all features that are enabled by default. | |
| enabledByDefault | back to summary |
|---|---|
| public boolean enabledByDefault() Implements tools. Doc from tools. Accessor for checking whether this feature is enabled by default.
| |
| enabledIn | back to summary |
|---|---|
| public boolean enabledIn(int flags) Implements tools. Doc from tools. Convenience method for checking whether feature is enabled in given bitmask.
| |
| getMask | back to summary |
|---|---|
| public int getMask() Implements tools. Doc from tools. Returns bit mask for this feature instance; must be a single bit,
that is of form
| |
| valueOf | back to summary |
|---|---|
| public static CsvReadFeature valueOf(String name) | |
| values | back to summary |
|---|---|
| public static CsvReadFeature[] values() | |