Class RFC4180ParserBuilder
java.lang.Object
com.opencsv.RFC4180ParserBuilder
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 Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Constructs RFC4180Parser.charcharwithFieldAsNull(CSVReaderNullFieldIndicator fieldIndicator) Sets the NullFieldIndicator.withQuoteChar(char quoteChar) Sets the character to use for quoted elements.withSeparator(char separator) Sets the delimiter to use for separating entries.
-
Field Details
-
separator
private char separator -
quoteChar
private char quoteChar -
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
- Returns:
- The null field indicator.
-
build
Constructs RFC4180Parser.- Returns:
- A new RFC4180Parser with defined settings.
-
withSeparator
Sets the delimiter to use for separating entries.- Parameters:
separator- The delimiter to use for separating entries- Returns:
- The RFC4180ParserBuilder
-
withQuoteChar
Sets the character to use for quoted elements.- Parameters:
quoteChar- The character to use for quoted element.- Returns:
- The RFC4180ParserBuilder
-
withFieldAsNull
Sets the NullFieldIndicator.- Parameters:
fieldIndicator- CSVReaderNullFieldIndicator set to what should be considered a null field.- Returns:
- The RFC4180ParserBuilder
-