public static class CsvPreference.Builder extends Object
Constructor and Description |
---|
CsvPreference.Builder(char quoteChar,
int delimiterChar,
String endOfLineSymbols)
Constructs a Builder with the mandatory preference values.
|
CsvPreference.Builder(CsvPreference preference)
Constructs a Builder with all of the values from an existing CsvPreference instance.
|
Modifier and Type | Method and Description |
---|---|
CsvPreference |
build()
Builds the CsvPreference instance.
|
CsvPreference.Builder |
surroundingSpacesNeedQuotes(boolean surroundingSpacesNeedQuotes)
Flag indicating whether spaces at the beginning or end of a cell should be ignored if they're not surrounded
by quotes (applicable to both reading and writing CSV).
|
public CsvPreference.Builder(CsvPreference preference)
preference
- the existing preferencepublic CsvPreference.Builder(char quoteChar, int delimiterChar, String endOfLineSymbols)
quoteChar
- matching pairs of this character are used to escape columns containing the delimiterdelimiterChar
- the character separating each columnendOfLineSymbols
- one or more symbols terminating the line, e.g. "\n". Only used for writing.IllegalArgumentException
- if quoteChar and delimiterChar are the same characterNullPointerException
- if endOfLineSymbols is nullpublic CsvPreference.Builder surroundingSpacesNeedQuotes(boolean surroundingSpacesNeedQuotes)
surroundingSpacesNeedQuotes
- flag indicating whether spaces at the beginning or end of a cell should be ignored if they're not
surrounded by quotespublic CsvPreference build()
Copyright © 2007-2012 Super CSV. All Rights Reserved.