|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.commons.csv.CSVUtils
public class CSVUtils
Utility methods for dealing with CSV files
Field Summary | |
---|---|
private static java.lang.String[][] |
EMPTY_DOUBLE_STRING_ARRAY
|
private static java.lang.String[] |
EMPTY_STRING_ARRAY
|
Constructor Summary | |
---|---|
CSVUtils()
CSVUtils instances should NOT be constructed in
standard programming. |
Method Summary | |
---|---|
static java.lang.String[][] |
parse(java.lang.String s)
Parses the given String according to the default CSVStrategy . |
static java.lang.String[] |
parseLine(java.lang.String s)
Parses the first line only according to the default CSVStrategy . |
static java.lang.String |
printLine(java.lang.String[] values)
Converts an array of string values into a single CSV line. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static final java.lang.String[] EMPTY_STRING_ARRAY
private static final java.lang.String[][] EMPTY_DOUBLE_STRING_ARRAY
Constructor Detail |
---|
public CSVUtils()
CSVUtils
instances should NOT be constructed in
standard programming.
This constructor is public to permit tools that require a JavaBean instance to operate.
Method Detail |
---|
public static java.lang.String printLine(java.lang.String[] values)
null
values are converted to the string "null"
,
all strings equal to "null"
will additionally get quotes
around.
values
- the value array
public static java.lang.String[][] parse(java.lang.String s) throws java.io.IOException
CSVStrategy
.
s
- CSV String to be parsed.
java.io.IOException
- in case of errorpublic static java.lang.String[] parseLine(java.lang.String s) throws java.io.IOException
CSVStrategy
.
Parsing empty string will be handled as valid records containing zero
elements, so the following property holds: parseLine("").length == 0.
s
- CSV String to be parsed.
java.io.IOException
- in case of error
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |