Constructor and Description |
---|
CSVParserBuilder()
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
CSVParser |
build()
Constructs CSVParser.
|
char |
getEscapeChar() |
char |
getQuoteChar() |
char |
getSeparator() |
boolean |
isIgnoreLeadingWhiteSpace() |
boolean |
isIgnoreQuotations() |
boolean |
isStrictQuotes() |
CSVReaderNullFieldIndicator |
nullFieldIndicator() |
CSVParserBuilder |
withErrorLocale(Locale errorLocale)
Sets the locale for all error messages.
|
CSVParserBuilder |
withEscapeChar(char escapeChar)
Sets the character to use for escaping a separator or quote.
|
CSVParserBuilder |
withFieldAsNull(CSVReaderNullFieldIndicator fieldIndicator)
Sets the NullFieldIndicator.
|
CSVParserBuilder |
withIgnoreLeadingWhiteSpace(boolean ignoreLeadingWhiteSpace)
Sets the ignore leading whitespace setting - if true, white space
in front of a quote in a field is ignored.
|
CSVParserBuilder |
withIgnoreQuotations(boolean ignoreQuotations)
Sets the ignore quotations mode - if true, quotations are ignored.
|
CSVParserBuilder |
withQuoteChar(char quoteChar)
Sets the character to use for quoted elements.
|
CSVParserBuilder |
withSeparator(char separator)
Sets the delimiter to use for separating entries.
|
CSVParserBuilder |
withStrictQuotes(boolean strictQuotes)
Sets the strict quotes setting - if true, characters
outside the quotes are ignored.
|
public CSVParserBuilder withSeparator(char separator)
separator
- The delimiter to use for separating entriespublic CSVParserBuilder withQuoteChar(char quoteChar)
quoteChar
- The character to use for quoted element.public CSVParserBuilder withEscapeChar(char escapeChar)
escapeChar
- The character to use for escaping a separator or quote.public CSVParserBuilder withStrictQuotes(boolean strictQuotes)
strictQuotes
- If true, characters outside the quotes are ignoredpublic CSVParserBuilder withIgnoreLeadingWhiteSpace(boolean ignoreLeadingWhiteSpace)
ignoreLeadingWhiteSpace
- If true, white space in front of a quote in a field is ignoredpublic CSVParserBuilder withIgnoreQuotations(boolean ignoreQuotations)
ignoreQuotations
- If true, quotations are ignoredpublic CSVParser build()
public char getSeparator()
public char getQuoteChar()
public char getEscapeChar()
public boolean isStrictQuotes()
public boolean isIgnoreLeadingWhiteSpace()
public boolean isIgnoreQuotations()
public CSVParserBuilder withFieldAsNull(CSVReaderNullFieldIndicator fieldIndicator)
fieldIndicator
- CSVReaderNullFieldIndicator set to what should be considered a null field.public CSVParserBuilder withErrorLocale(Locale errorLocale)
errorLocale
- Locale for error messagesthis
public CSVReaderNullFieldIndicator nullFieldIndicator()
Copyright © 2005–2023. All rights reserved.