public class CsvProperties
extends com.smoothcsv.core.macro.apiimpl.APIBase
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
AUTO |
static java.lang.String |
CR |
static java.lang.String |
CRLF |
static java.lang.String |
LF |
static int |
NO_QUOTE
Suppresses all quoting.
|
static int |
QUOTES_ALL
Quotes all values.
|
static int |
QUOTES_IF_NECESSARY
Quotes only when the value contains delimiter, quote, or escape.
|
Constructor and Description |
---|
CsvProperties()
Creates CsvProperties.
|
Modifier and Type | Method and Description |
---|---|
static CsvProperties |
defaultProperties()
Creates default CsvProperties.
|
java.lang.String |
getCharset()
Returns the charset that is used for saving file.
|
java.lang.String |
getDelimiter()
Returns the character to separate each field.
|
java.lang.String |
getEscape()
Returns the character to escape quote characters.
|
java.lang.String |
getNewlineCharacter()
Returns the newline character that is used for saving file.
|
java.lang.String |
getQuote()
Returns the character to quote a field.
|
int |
getQuoteOption()
Returns the rule which indicates how to apply quote to a value.
|
boolean |
hasBOM()
Returns if the BOM (Byte Order Mark) will be inserted.
|
void |
setCharset(java.lang.String charset)
Sets the charset that is used for saving file.
|
void |
setDelimiter(java.lang.String delimiter)
Sets the character to separate each field.
|
void |
setEscape(java.lang.String escape)
Sets the character to escape quote characters.
|
void |
setHasBOM(boolean hasBOM)
Sets if the BOM (Byte Order Mark) will be inserted.
|
void |
setNewlineCharacter(java.lang.String newlineCharacter)
Sets the newline character that is used for saving file.
|
void |
setQuote(java.lang.String quote)
Sets the character to quote a field.
|
void |
setQuoteOption(int quoteOption)
Sets the rule which indicates how to apply quote to a value.
|
public static final java.lang.String AUTO
public static final int NO_QUOTE
public static final int QUOTES_ALL
public static final int QUOTES_IF_NECESSARY
public static final java.lang.String CR
public static final java.lang.String LF
public static final java.lang.String CRLF
public static CsvProperties defaultProperties()
public java.lang.String getDelimiter()
public void setDelimiter(java.lang.String delimiter)
delimiter
- the character to separate each fieldpublic java.lang.String getQuote()
public void setQuote(java.lang.String quote)
quote
- the character to quote a fieldpublic java.lang.String getEscape()
public void setEscape(java.lang.String escape)
escape
- the character to escape quote characterspublic java.lang.String getCharset()
public void setCharset(java.lang.String charset)
charset
- the charset to setpublic void setHasBOM(boolean hasBOM)
hasBOM
- true if the BOM (Byte Order Mark) will be insertedpublic boolean hasBOM()
public java.lang.String getNewlineCharacter()
public void setNewlineCharacter(java.lang.String newlineCharacter)
newlineCharacter
- the newline character to setpublic int getQuoteOption()
public void setQuoteOption(int quoteOption)
quoteOption
- the quoteOption to set