com.univocity.parsers.csv
Class CsvWriterSettings

java.lang.Object
  extended by com.univocity.parsers.common.CommonSettings<F>
      extended by com.univocity.parsers.common.CommonWriterSettings<CsvFormat>
          extended by com.univocity.parsers.csv.CsvWriterSettings

public class CsvWriterSettings
extends CommonWriterSettings<CsvFormat>

This is the configuration class used by the CSV writer (CsvWriter)

In addition to the configuration options provided by CommonWriterSettings, the CsvWriterSettings include:

Author:
uniVocity Software Pty Ltd - [email protected]
See Also:
CsvWriter, CsvFormat, CommonWriterSettings

Constructor Summary
CsvWriterSettings()
           
 
Method Summary
protected  CsvFormat createDefaultFormat()
          Returns the default CsvFormat configured to produce CSV outputs compliant to the RFC4180 standard.
 boolean getQuoteAllFields()
          Indicates that all written values should be enclosed within quotes (as defined in CsvFormat)
 void setQuoteAllFields(boolean quoteAllFields)
          Indicates indicates whether or not all written values should be enclosed within quotes (as defined in CsvFormat)
 
Methods inherited from class com.univocity.parsers.common.CommonWriterSettings
getEmptyValue, getRowWriterProcessor, setEmptyValue, setRowWriterProcessor
 
Methods inherited from class com.univocity.parsers.common.CommonSettings
excludeFields, excludeIndexes, getFormat, getHeaders, getIgnoreLeadingWhitespaces, getIgnoreTrailingWhitespaces, getMaxCharsPerColumn, getMaxColumns, getNullValue, getSkipEmptyLines, selectFields, selectIndexes, setFormat, setHeaders, setIgnoreLeadingWhitespaces, setIgnoreTrailingWhitespaces, setMaxCharsPerColumn, setMaxColumns, setNullValue, setSkipEmptyLines
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CsvWriterSettings

public CsvWriterSettings()
Method Detail

getQuoteAllFields

public boolean getQuoteAllFields()
Indicates that all written values should be enclosed within quotes (as defined in CsvFormat)

(Defaults to false)

Returns:
true if all written values should be enclosed within quotes, false otherwise

setQuoteAllFields

public void setQuoteAllFields(boolean quoteAllFields)
Indicates indicates whether or not all written values should be enclosed within quotes (as defined in CsvFormat)

(Defaults to false)

By default, only values that contain a field separator are enclosed within quotes.

Parameters:
quoteAllFields - a flag indicating whether to enclose all fields within quotes

createDefaultFormat

protected CsvFormat createDefaultFormat()
Returns the default CsvFormat configured to produce CSV outputs compliant to the RFC4180 standard.

Specified by:
createDefaultFormat in class CommonSettings<CsvFormat>
Returns:
and instance of CsvFormat configured to produce CSV outputs compliant to the RFC4180 standard.


Copyright © 2014 uniVocity Software Pty Ltd. All rights reserved.