org.apache.commons.csv.writer

Class CSVWriter


public class CSVWriter
extends java.lang.Object

CSVWriter
Version:
$Id: $
Author:
Martin van den Bemt

Field Summary

private CSVConfig
config
The CSV config *
private Writer
writer
The writer *

Constructor Summary

CSVWriter()
CSVWriter(CSVConfig config)

Method Summary

CSVConfig
getConfig()
void
setConfig(CSVConfig config)
Set the CSVConfig
void
setWriter(Writer writer)
Set the writer to write the CSV file to.
void
writeRecord(Map map)
protected String
writeValue(CSVField field, String value)

Field Details

config

private CSVConfig config
The CSV config *

writer

private Writer writer
The writer *

Constructor Details

CSVWriter

public CSVWriter()

CSVWriter

public CSVWriter(CSVConfig config)

Method Details

getConfig

public CSVConfig getConfig()
Returns:
the CVSConfig or null if not present

setConfig

public void setConfig(CSVConfig config)
Set the CSVConfig
Parameters:
config - the CVSConfig

setWriter

public void setWriter(Writer writer)
Set the writer to write the CSV file to.
Parameters:
writer - the writer.

writeRecord

public void writeRecord(Map map)

writeValue

protected String writeValue(CSVField field,
                            String value)
            throws Exception