|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectariba.util.io.CSVWriter
public final class CSVWriter
CSVWriter will stream data to an outputStream or file.
| Constructor Summary | |
|---|---|
CSVWriter(File file,
String encoding,
boolean header)
Creates a CSVWriter which writes to a specified Writer after prepending a encoding header |
|
CSVWriter(Writer writer)
Creates a CSVWriter which writes to a specified Writer. |
|
CSVWriter(Writer writer,
String encoding)
Creates a CSVWriter which writes to a specified Writer after prepending a encoding header |
|
| Method Summary | |
|---|---|
void |
close()
closes the stream. |
static void |
quoteStringForCSVFile(PrintWriter out,
String string)
Generally useful string quoting routine for producing CSV output. |
void |
writeLine(List vector)
Writes a vector of Strings as a CSV row. |
void |
writeLine(List vector,
String patternToIgnore)
Writes a vector of Strings as a CSV row. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public CSVWriter(File file,
String encoding,
boolean header)
throws IOException
file - The file where data will be written.encoding - The encoding used to write to the fileheader - true if an encoding header is desired
IOExceptionpublic CSVWriter(Writer writer)
writer - The writer where data will be written.
public CSVWriter(Writer writer,
String encoding)
writer - The Writer where data will be written.encoding - The encoding header to write.| Method Detail |
|---|
public void writeLine(List vector)
vector - Strings to write to CSV file
public void writeLine(List vector,
String patternToIgnore)
vector - Strings to write to CSV filepatternToIgnore - is not written in the csv file ie
you will see ,, in the file as opposed to ,"",public void close()
public static void quoteStringForCSVFile(PrintWriter out,
String string)
out - output writer to which string will be writtenstring - string to write
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||