Class CustomPreferenceBuilder

java.lang.Object
com.adaptris.csv.CustomPreferenceBuilder
All Implemented Interfaces:
PreferenceBuilder

public class CustomPreferenceBuilder extends Object implements 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 Details

    • CustomPreferenceBuilder

      public CustomPreferenceBuilder()
  • Method Details

    • getDelimiter

      public Character getDelimiter()
    • setDelimiter

      public void setDelimiter(Character d)
      Set the delimiter for the CSV file.
      Parameters:
      d - the delimiter; if not specified, defaults to ,
    • getQuoteChar

      public Character getQuoteChar()
    • setQuoteChar

      public void setQuoteChar(Character quoteChar)
      Set the quote character for the CSV file.
      Parameters:
      quoteChar - the delimiter; if not specified, defaults to "
    • getIgnoreEmptyLines

      public Boolean getIgnoreEmptyLines()
    • setIgnoreEmptyLines

      public void setIgnoreEmptyLines(Boolean b)
      Specify whether or not to ignore empty lines.
      Parameters:
      b - true or false, if not specified false.
    • getRecordSeparator

      public String getRecordSeparator()
    • setRecordSeparator

      public void setRecordSeparator(String sep)
      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 interface PreferenceBuilder
      Returns:
      the CSV Format.