Class CsvLineTokenizerUtil

java.lang.Object
io.deephaven.enterprise.niowrapper.csv.CsvLineTokenizerUtil

public class CsvLineTokenizerUtil extends Object
Utilities for working with lines in CSV format.
  • Constructor Details

    • CsvLineTokenizerUtil

      public CsvLineTokenizerUtil()
  • Method Details

    • getAllTokens

      public static String[] getAllTokens(String inputLine)
    • getAllTokens

      public static String[] getAllTokens(String inputLine, char separator)
    • getAllTokensTrimmed

      public static String[] getAllTokensTrimmed(String inputLine)
    • getAllTokensTrimmed

      public static String[] getAllTokensTrimmed(String inputLine, char separator)
    • appendQuotedToken

      public static void appendQuotedToken(String token, StringBuffer stringBuffer)
      Appends the given token to the given stringBuffer, quoting the token always. No commas are appended.
    • appendToken

      public static void appendToken(String token, StringBuffer stringBuffer)
      Appends the given token to the given stringBuffer, quoting the token only if necessary. No commas are appended.
    • appendQuotedToken

      public static void appendQuotedToken(String token, StringBuilder stringBuilder)
      Appends the given token to the given stringBuilder, quoting the token always. No commas are appended.
    • appendToken

      public static void appendToken(String token, StringBuilder stringBuilder)
      Appends the given token to the given stringBuilder, quoting the token only if necessary. No commas are appended.
    • appendToken

      public static com.fishlib.io.streams.ByteBufferOutputStream appendToken(String token, com.fishlib.io.streams.ByteBufferOutputStream out)
      Appends the given token to the given stringBuilder, quoting the token only if necessary. No commas are appended.
    • appendCsvLine

      public static void appendCsvLine(List<? extends Object> input, StringBuffer buffer)
      Creates an entire csv line, including commas, and an eol character. It uses the toString element of the items in the list, and inserts them into the line in iterator order. Output is returned in the buffer.
    • appendCsvLine

      public static void appendCsvLine(List<? extends Object> input, StringBuilder buffer)
      Creates an entire csv line, including commas, and an eol character. It uses the toString element of the items in the list, and inserts them into the line in iterator order. Output is returned in the buffer.