Package com.adaptris.csv
Class CustomPreferenceBuilder
java.lang.Object
com.adaptris.csv.CustomPreferenceBuilder
- All Implemented Interfaces:
PreferenceBuilder
Implementation of
PreferenceBuilder
that allows for custom csv formats.In the adapter configuration file this class is aliased as csv-custom-preference-builder which is the preferred alternative to the fully qualified classname when building your configuration.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionorg.supercsv.prefs.CsvPreference
build()
Create the CSVFormat.void
Set the delimiter for the CSV file.void
Specify whether or not to ignore empty lines.void
setQuoteChar
(Character quoteChar) Set the quote character for the CSV file.void
setRecordSeparator
(String sep) Set the record separactor
-
Constructor Details
-
CustomPreferenceBuilder
public CustomPreferenceBuilder()
-
-
Method Details
-
getDelimiter
-
setDelimiter
Set the delimiter for the CSV file.- Parameters:
d
- the delimiter; if not specified, defaults to,
-
getQuoteChar
-
setQuoteChar
Set the quote character for the CSV file.- Parameters:
quoteChar
- the delimiter; if not specified, defaults to"
-
getIgnoreEmptyLines
-
setIgnoreEmptyLines
Specify whether or not to ignore empty lines.- Parameters:
b
- true or false, if not specified false.
-
getRecordSeparator
-
setRecordSeparator
Set the record separactor- Parameters:
sep
- the record separator; if not specified defaults to "\r\n"
-
build
public org.supercsv.prefs.CsvPreference build()Description copied from interface:PreferenceBuilder
Create the CSVFormat.- Specified by:
build
in interfacePreferenceBuilder
- Returns:
- the CSV Format.
-