Package com.univocity.parsers.csv
Enum Class UnescapedQuoteHandling
- All Implemented Interfaces:
Serializable
,Comparable<UnescapedQuoteHandling>
,Constable
This enumeration is used to determine how the (
CsvParser
) will handle values with unescaped quotes.
Use CsvParserSettings.setUnescapedQuoteHandling(UnescapedQuoteHandling)
to configure the appropriate
handling of unescaped quotes on your input.-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionIf unescaped quotes are found in the input, consider the value as an unquoted value.If unescaped quotes are found in the input, aTextParsingException
will be thrown.If unescaped quotes are found in the input, the content parsed for the given value will be skipped (until the next delimiter is found) and the value set inCommonSettings.getNullValue()
will be produced instead.If unescaped quotes are found in the input, accumulate the quote character and proceed parsing the value as a quoted value, until a closing quote is found.If unescaped quotes are found in the input, consider the value as an unquoted value. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic UnescapedQuoteHandling
Returns the enum constant of this class with the specified name.static UnescapedQuoteHandling[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
STOP_AT_CLOSING_QUOTE
If unescaped quotes are found in the input, accumulate the quote character and proceed parsing the value as a quoted value, until a closing quote is found. -
BACK_TO_DELIMITER
If unescaped quotes are found in the input, consider the value as an unquoted value. This will make the parser accumulate all characters of the current parsed value until the delimiter defined byCsvFormat.getDelimiter()
is found. If no delimiter is found in the value, the parser will continue accumulating characters from the input until a delimiter or line ending is found. -
STOP_AT_DELIMITER
If unescaped quotes are found in the input, consider the value as an unquoted value. This will make the parser accumulate all characters until the delimiter defined byCsvFormat.getDelimiter()
, or a line ending is found in the input. -
SKIP_VALUE
If unescaped quotes are found in the input, the content parsed for the given value will be skipped (until the next delimiter is found) and the value set inCommonSettings.getNullValue()
will be produced instead. -
RAISE_ERROR
If unescaped quotes are found in the input, aTextParsingException
will be thrown.
-
-
Constructor Details
-
UnescapedQuoteHandling
private UnescapedQuoteHandling()
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-