Top Description Fields Constructors Methods
com.univocity.parsers.tsv

public Class TsvParserSettings

extends CommonParserSettings<TsvFormat>
Class Inheritance
Imports
com.univocity.parsers.common.*, java.util.*

This is the configuration class used by the TSV parser (TsvParser)

It supports the configuration options provided by CommonParserSettings only

Author
Univocity Software Pty Ltd - [email protected]
See Also
com.univocity.parsers.tsv.TsvParser, com.univocity.parsers.tsv.TsvFormat, com.univocity.parsers.common.CommonParserSettings

Field Summary

Modifier and TypeField and Description
private boolean
Inherited from com.univocity.parsers.common.CommonParserSettings:
headerExtractionEnabled

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
protected void
public final TsvParserSettings
clone()

Overrides com.univocity.parsers.common.CommonParserSettings.clone.

Clones this configuration object.
public final TsvParserSettings
clone(boolean
flag indicating whether to clear settings that are likely to be associated with a given input.
clearInputSpecificSettings
)

Overrides com.univocity.parsers.common.CommonParserSettings.clone.

Clones this configuration object to reuse user-provided settings.
protected TsvFormat

Returns:

and instance of TsvFormat configured to handle TSV
createDefaultFormat
()

Implements abstract com.univocity.parsers.common.CommonSettings.createDefaultFormat.

Returns the default TsvFormat configured to handle TSV inputs
public boolean

Returns:

true if line joining is enabled, otherwise false
isLineJoiningEnabled
()

Identifies whether or lines ending with the escape character (defined by TsvFormat#getEscapeChar() and followed by a line separator character should be joined with the following line.

public void
setLineJoiningEnabled(boolean
a flag indicating whether or not to enable line joining.
lineJoiningEnabled
)

Defines how the parser should handle escaped line separators.

Inherited from com.univocity.parsers.common.CommonParserSettings:
addInputAnalysisProcessclearInputSpecificSettingsconfigureFromAnnotationsgetInputAnalysisProcessesgetInputBufferSizegetNumberOfRecordsToReadgetNumberOfRowsToSkipgetProcessorgetReadInputOnSeparateThreadgetRowProcessorisAutoClosingEnabledisColumnReorderingEnabledisCommentCollectionEnabledisCommentProcessingEnabledisHeaderExtractionEnabledisLineSeparatorDetectionEnablednewCharAppendernewCharInputReadersetAutoClosingEnabledsetColumnReorderingEnabledsetCommentCollectionEnabledsetCommentProcessingEnabledsetHeaderExtractionEnabledsetInputBufferSizesetLineSeparatorDetectionEnabledsetNumberOfRecordsToReadsetNumberOfRowsToSkipsetProcessorsetReadInputOnSeparateThreadsetRowProcessor

Field Detail

lineJoiningEnabledback to summary
private boolean lineJoiningEnabled

Constructor Detail

TsvParserSettingsback to summary
public TsvParserSettings()

Method Detail

addConfigurationback to summary
protected void addConfiguration(Map<String, Object> out)

Overrides com.univocity.parsers.common.CommonParserSettings.addConfiguration.

Annotations
@Override
cloneback to summary
public final TsvParserSettings clone()

Overrides com.univocity.parsers.common.CommonParserSettings.clone.

Doc from com.univocity.parsers.common.CommonSettings.clone.

Clones this configuration object. Use alternative clone(boolean) method to reset properties that are specific to a given input, such as header names and selection of fields.

Returns:TsvParserSettings

a copy of all configurations applied to the current instance.

Annotations
@Override
cloneback to summary
public final TsvParserSettings clone(boolean clearInputSpecificSettings)

Overrides com.univocity.parsers.common.CommonParserSettings.clone.

Doc from com.univocity.parsers.common.CommonSettings.clone.

Clones this configuration object to reuse user-provided settings. Properties that are specific to a given input (such as header names and selection of fields) can be reset to their defaults if the clearInputSpecificSettings flag is set to true

Parameters
clearInputSpecificSettings:boolean

flag indicating whether to clear settings that are likely to be associated with a given input.

Returns:TsvParserSettings

a copy of the configurations applied to the current instance.

Annotations
@Override
createDefaultFormatback to summary
protected TsvFormat createDefaultFormat()

Implements abstract com.univocity.parsers.common.CommonSettings.createDefaultFormat.

Returns the default TsvFormat configured to handle TSV inputs

Returns:TsvFormat

and instance of TsvFormat configured to handle TSV

Annotations
@Override
isLineJoiningEnabledback to summary
public boolean isLineJoiningEnabled()

Identifies whether or lines ending with the escape character (defined by TsvFormat#getEscapeChar() and followed by a line separator character should be joined with the following line. Typical examples include inputs where lines end with sequences such as: '\'+'\n' and '\'+'\r'+'\n'. When line joining is disabled (the default), the TsvParser converts sequences containing the escape character (typically '\') followed by characters 'n' or 'r' into a '\n' or '\r' character. It will continue processing the contents found in the same line, until a new line character is found. If line joining is enabled, the TsvParser will convert sequences containing the escape character, followed by characters '\n', '\r' or '\r\n', into a '\n' or '\r' character. It will continue processing the contents found in the next line, until a new line character is found, given it is not preceded by another escape character.

Returns:boolean

true if line joining is enabled, otherwise false

setLineJoiningEnabledback to summary
public void setLineJoiningEnabled(boolean lineJoiningEnabled)

Defines how the parser should handle escaped line separators. By enabling lines joining, lines ending with the escape character (defined by TsvFormat#getEscapeChar() and followed by a line separator character will be joined with the following line. Typical examples include inputs where lines end with sequences such as: '\'+'\n' and '\'+'\r'+'\n'. When line joining is disabled (the default), the TsvParser converts sequences containing the escape character (typically '\') followed by characters 'n' or 'r' into a '\n' or '\r' character. It will continue processing the contents found in the same line, until a new line character is found. If line joining is enabled, the TsvParser will convert sequences containing the escape character, followed by characters '\n', '\r' or '\r\n', into a '\n' or '\r' character. It will continue processing the contents found in the next line, until a new line character is found, given it is not preceded by another escape character.

Parameters
lineJoiningEnabled:boolean

a flag indicating whether or not to enable line joining.