Package com.opencsv

Class RFC4180ParserBuilder


  • public class RFC4180ParserBuilder
    extends java.lang.Object
    Builder for creating a RFC4180Parser.

    Example code for using this class:

    final RFC4180Parser parser =
    new RFC4180ParserBuilder()
    .withSeparator('\t')
    .build();

    Since:
    3.9
    See Also:
    RFC4180Parser
    • Constructor Detail

      • RFC4180ParserBuilder

        public RFC4180ParserBuilder()
        Default constructor.
    • Method Detail

      • getSeparator

        public char getSeparator()
        Returns:
        The defined separator.
      • getQuoteChar

        public char getQuoteChar()
        Returns:
        The defined quotation character.
      • build

        public RFC4180Parser build()
        Constructs RFC4180Parser.
        Returns:
        A new RFC4180Parser with defined settings.
      • withSeparator

        public RFC4180ParserBuilder withSeparator​(char separator)
        Sets the delimiter to use for separating entries.
        Parameters:
        separator - The delimiter to use for separating entries
        Returns:
        The RFC4180ParserBuilder
      • withQuoteChar

        public RFC4180ParserBuilder withQuoteChar​(char quoteChar)
        Sets the character to use for quoted elements.
        Parameters:
        quoteChar - The character to use for quoted element.
        Returns:
        The RFC4180ParserBuilder
      • withFieldAsNull

        public RFC4180ParserBuilder withFieldAsNull​(CSVReaderNullFieldIndicator fieldIndicator)
        Sets the NullFieldIndicator.
        Parameters:
        fieldIndicator - CSVReaderNullFieldIndicator set to what should be considered a null field.
        Returns:
        The RFC4180ParserBuilder