Class QuotedCSV

All Implemented Interfaces:
Iterable<String>
Direct Known Subclasses:
QuotedQualityCSV

public class QuotedCSV extends QuotedCSVParser implements Iterable<String>
Implements a quoted comma separated list of values in accordance with RFC7230. OWS is removed and quoted characters ignored for parsing.
See Also:
  • "https://tools.ietf.org/html/rfc7230#section-3.2.6"
  • "https://tools.ietf.org/html/rfc7230#section-7"
  • Field Details

    • ABNF_REQUIRED_QUOTING

      public static final String ABNF_REQUIRED_QUOTING
      ABNF from RFC 2616, RFC 822, and RFC 6455 specified characters requiring quoting.
      See Also:
    • _values

      protected final List<String> _values
  • Constructor Details

    • QuotedCSV

      public QuotedCSV(String... values)
    • QuotedCSV

      public QuotedCSV(boolean keepQuotes, String... values)
  • Method Details

    • join

      public static String join(List<String> values)
      Join a list into Quoted CSV string
      Parameters:
      values - A list of values
      Returns:
      A Quoted Comma Separated Value list
    • join

      public static String join(String... values)
      Join a list into Quoted CSV string
      Parameters:
      values - A list of values
      Returns:
      A Quoted Comma Separated Value list
    • join

      public static void join(StringBuilder builder, List<String> values)
      Join a list into Quoted CSV StringBuilder
      Parameters:
      builder - A builder to join the list into
      values - A list of values
    • parsedValueAndParams

      protected void parsedValueAndParams(StringBuffer buffer)
      Description copied from class: QuotedCSVParser
      Called when a value and it's parameters has been parsed
      Overrides:
      parsedValueAndParams in class QuotedCSVParser
      Parameters:
      buffer - Containing the trimmed value and parameters
    • size

      public int size()
    • isEmpty

      public boolean isEmpty()
    • getValues

      public List<String> getValues()
    • iterator

      public Iterator<String> iterator()
      Specified by:
      iterator in interface Iterable<String>
    • toString

      public String toString()
      Overrides:
      toString in class Object