public class CSVHelper
extends java.lang.Object
Constructor and Description |
---|
CSVHelper() |
Modifier and Type | Method and Description |
---|---|
static java.util.List<java.lang.String> |
parseLine(java.io.Reader r)
returns a row of values as a list
returns null if you are past the end of the line
|
static void |
writeLine(java.io.Writer w,
java.util.List<java.lang.String> values)
Write a single row of a CSV table, all values are quoted
|
static void |
writeLine(java.io.Writer w,
java.lang.String... values)
Write a single row of a CSV table, all values are quoted
using variable parameter syntax so you are not required
to construct a List
|
static void |
writeTable(java.io.Writer w,
java.util.List<java.util.List<java.lang.String>> table)
Just a convenience method that iterates teh rows of a table and outputs
to a writer which is presumably a CSV file.
|
public static void writeTable(java.io.Writer w, java.util.List<java.util.List<java.lang.String>> table) throws java.lang.Exception
java.lang.Exception
public static void writeLine(java.io.Writer w, java.util.List<java.lang.String> values) throws java.lang.Exception
java.lang.Exception
public static void writeLine(java.io.Writer w, java.lang.String... values) throws java.lang.Exception
java.lang.Exception
public static java.util.List<java.lang.String> parseLine(java.io.Reader r) throws java.lang.Exception
java.lang.Exception