Class NormalQuoteMode

java.lang.Object
org.supercsv.quote.NormalQuoteMode
All Implemented Interfaces:
QuoteMode

public class NormalQuoteMode extends Object implements QuoteMode
When using NormalQuoteMode surrounding quotes are only applied if required to escape special characters (per RFC4180).
Since:
2.1.0
  • Constructor Details

    • NormalQuoteMode

      public NormalQuoteMode()
      Constructs a new NormalQuoteMode.
  • Method Details

    • quotesRequired

      public boolean quotesRequired(String csvColumn, CsvContext context, CsvPreference preference)
      Determines whether surrounding quotes are mandatory in cases where the CSV column would not normally be quoted (the data to be written doesn't contain special characters).
      Specified by:
      quotesRequired in interface QuoteMode
      Parameters:
      csvColumn - an element of a CSV file
      context - the context
      preference - the CSV preferences
      Returns:
      true if surrounding quotes are mandatory, otherwise false