com.mtgi.csv
Class CSVUtil
java.lang.Object
com.mtgi.csv.CSVUtil
public class CSVUtil
- extends Object
Method Summary |
static String |
quoteCSV(Object value)
Calls #quoteCSV(String, Appendable) to construct a new
escaped string based on str . |
static Appendable |
quoteCSV(Object value,
Appendable escaped)
Add double quotes around str , stuttering any internal
quotation marks in the manner expected by most CSV parsers. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CSVUtil
public CSVUtil()
quoteCSV
public static String quoteCSV(Object value)
- Calls
#quoteCSV(String, Appendable)
to construct a new
escaped string based on str
.
- Returns:
- the escaped string
quoteCSV
public static Appendable quoteCSV(Object value,
Appendable escaped)
throws IOException
- Add double quotes around
str
, stuttering any internal
quotation marks in the manner expected by most CSV parsers.
- Parameters:
str
- the input string, to be quoted.escaped
- destination to which the escaped text is written
- Returns:
- a reference to
escaped
, for syntactic convenience
- Throws:
IOException
- if escaped
raises errors while the data is being written.