Package com.opencsv

Class RFC4180ParserBuilder

java.lang.Object
com.opencsv.RFC4180ParserBuilder

public class RFC4180ParserBuilder extends 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:
  • Field Details

    • separator

      private char separator
    • quoteChar

      private char quoteChar
    • nullFieldIndicator

      private CSVReaderNullFieldIndicator nullFieldIndicator
  • Constructor Details

    • RFC4180ParserBuilder

      public RFC4180ParserBuilder()
      Default constructor.
  • Method Details

    • getSeparator

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

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

      public CSVReaderNullFieldIndicator nullFieldIndicator()
      Returns:
      The null field indicator.
    • 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