Class CsvLineTokenizerUtil
java.lang.Object
io.deephaven.enterprise.niowrapper.csv.CsvLineTokenizerUtil
Utilities for working with lines in CSV format.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidappendCsvLine(List<? extends Object> input, StringBuffer buffer) Creates an entire csv line, including commas, and an eol character.static voidappendCsvLine(List<? extends Object> input, StringBuilder buffer) Creates an entire csv line, including commas, and an eol character.static voidappendQuotedToken(String token, StringBuffer stringBuffer) Appends the given token to the given stringBuffer, quoting the token always.static voidappendQuotedToken(String token, StringBuilder stringBuilder) Appends the given token to the given stringBuilder, quoting the token always.static com.fishlib.io.streams.ByteBufferOutputStreamappendToken(String token, com.fishlib.io.streams.ByteBufferOutputStream out) Appends the given token to the given stringBuilder, quoting the token only if necessary.static voidappendToken(String token, StringBuffer stringBuffer) Appends the given token to the given stringBuffer, quoting the token only if necessary.static voidappendToken(String token, StringBuilder stringBuilder) Appends the given token to the given stringBuilder, quoting the token only if necessary.static String[]getAllTokens(String inputLine) static String[]getAllTokens(String inputLine, char separator) static String[]getAllTokensTrimmed(String inputLine) static String[]getAllTokensTrimmed(String inputLine, char separator)
-
Constructor Details
-
CsvLineTokenizerUtil
public CsvLineTokenizerUtil()
-
-
Method Details
-
getAllTokens
-
getAllTokens
-
getAllTokensTrimmed
-
getAllTokensTrimmed
-
appendQuotedToken
Appends the given token to the given stringBuffer, quoting the token always. No commas are appended. -
appendToken
Appends the given token to the given stringBuffer, quoting the token only if necessary. No commas are appended. -
appendQuotedToken
Appends the given token to the given stringBuilder, quoting the token always. No commas are appended. -
appendToken
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
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
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.
-