Class TsvParserSettings

    • Field Detail

      • lineJoiningEnabled

        private boolean lineJoiningEnabled
    • Constructor Detail

      • TsvParserSettings

        public TsvParserSettings()
    • Method Detail

      • isLineJoiningEnabled

        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:
        true if line joining is enabled, otherwise false
      • setLineJoiningEnabled

        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 - a flag indicating whether or not to enable line joining.
      • createDefaultFormat

        protected TsvFormat createDefaultFormat()
        Returns the default TsvFormat configured to handle TSV inputs
        Specified by:
        createDefaultFormat in class CommonSettings<TsvFormat>
        Returns:
        and instance of TsvFormat configured to handle TSV
      • clone

        public final TsvParserSettings clone​(boolean clearInputSpecificSettings)
        Description copied from class: CommonSettings
        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
        Overrides:
        clone in class CommonParserSettings<TsvFormat>
        Parameters:
        clearInputSpecificSettings - flag indicating whether to clear settings that are likely to be associated with a given input.
        Returns:
        a copy of the configurations applied to the current instance.