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

public Class TsvWriterSettings

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

This is the configuration class used by the TSV writer (TsvWriter)

It does not offer additional configuration options on top of the ones provided by the CommonWriterSettings

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

Field Summary

Modifier and TypeField and Description
private boolean

Constructor Summary

AccessConstructor and Description
public

Method Summary

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

Overrides com.univocity.parsers.common.CommonWriterSettings.clone.

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

Overrides com.univocity.parsers.common.CommonWriterSettings.clone.

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

Returns:

and instance of TsvFormat configured to produce TSV outputs.
createDefaultFormat
()

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

Returns the default TsvFormat.
public boolean

Returns:

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

Identifies whether values containing line endings should have the line separator written using the escape character (defined by TsvFormat#getEscapeChar() followed by the actual line separator character instead of other characters such as the standard letters 'n' and 'r' When line joining is disabled (the default), the TsvWriter will convert new line characters into sequences containing the escape character (typically '\') followed by characters 'n' or 'r'.

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

Defines how the writer should handle the escaping of line separators.

Inherited from com.univocity.parsers.common.CommonWriterSettings:
clearInputSpecificSettingsconfigureFromAnnotationsgetEmptyValuegetExpandIncompleteRowsgetRowWriterProcessorisColumnReorderingEnabledisHeaderWritingEnabledsetColumnReorderingEnabledsetEmptyValuesetExpandIncompleteRowssetHeaderWritingEnabledsetRowWriterProcessor

Field Detail

lineJoiningEnabledback to summary
private boolean lineJoiningEnabled

Constructor Detail

TsvWriterSettingsback to summary
public TsvWriterSettings()

Method Detail

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

Overrides com.univocity.parsers.common.CommonWriterSettings.addConfiguration.

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

Overrides com.univocity.parsers.common.CommonWriterSettings.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:TsvWriterSettings

a copy of all configurations applied to the current instance.

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

Overrides com.univocity.parsers.common.CommonWriterSettings.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:TsvWriterSettings

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.

Returns:TsvFormat

and instance of TsvFormat configured to produce TSV outputs.

Annotations
@Override
isLineJoiningEnabledback to summary
public boolean isLineJoiningEnabled()

Identifies whether values containing line endings should have the line separator written using the escape character (defined by TsvFormat#getEscapeChar() followed by the actual line separator character instead of other characters such as the standard letters 'n' and 'r' When line joining is disabled (the default), the TsvWriter will convert new line characters into sequences containing the escape character (typically '\') followed by characters 'n' or 'r'. No matter how many line separators the values written contain, the will be escaped and the entire output of a record will be written into a single line of text. For example, '\n' and '\r' characters will be written as: '\'+'n' and '\'+'r'. If line joining is enabled, the TsvWriter will convert line new line characters into sequences containing the escape character, followed by characters '\n', '\r' or both. A new line of text will be generated for each line separator found in the value to be written, "marking" the end of each line with the escape character to indicate the record continues on the next line. For example, '\n' and '\r' characters will be written as: '\'+'\n' and '\'+'\r'.

Returns:boolean

true if line joining is enabled, otherwise false

setLineJoiningEnabledback to summary
public void setLineJoiningEnabled(boolean lineJoiningEnabled)

Defines how the writer should handle the escaping of line separators. Values containing line endings should be escaped and the line separator characters can be written using the escape character (defined by TsvFormat#getEscapeChar() followed by the actual line separator character instead of other characters such as the standard letters 'n' and 'r' When line joining is disabled (the default), the TsvWriter will convert new line characters into sequences containing the escape character (typically '\') followed by characters 'n' or 'r'. No matter how many line separators the values written contain, the will be escaped and the entire output of a record will be written into a single line of text. For example, '\n' and '\r' characters will be written as: '\'+'n' and '\'+'r'. If line joining is enabled, the TsvWriter will convert line new line characters into sequences containing the escape character, followed by characters '\n', '\r' or both. A new line of text will be generated for each line separator found in the value to be written, "marking" the end of each line with the escape character to indicate the record continues on the next line. For example, '\n' and '\r' characters will be written as: '\'+'\n' and '\'+'\r'.

Parameters
lineJoiningEnabled:boolean

a flag indicating whether or not to enable line joining.