public class CsvWriteConfig extends CsvConfig<CsvWriteConfig> implements Serializable
Modifier and Type | Field and Description |
---|---|
protected boolean |
alwaysDelimitText
是否始终使用文本分隔符,文本包装符,默认false,按需添加
|
protected boolean |
endingLineBreak
文件末尾是否添加换行符
按照https://datatracker.ietf.org/doc/html/rfc4180#section-2 规范,末尾换行符可有可无。 |
protected char[] |
lineDelimiter
换行符
|
commentCharacter, fieldSeparator, headerAlias, textDelimiter
Constructor and Description |
---|
CsvWriteConfig() |
Modifier and Type | Method and Description |
---|---|
static CsvWriteConfig |
defaultConfig()
默认配置
|
CsvWriteConfig |
setAlwaysDelimitText(boolean alwaysDelimitText)
设置是否始终使用文本分隔符,文本包装符,默认false,按需添加
|
CsvWriteConfig |
setEndingLineBreak(boolean endingLineBreak)
文件末尾是否添加换行符
按照https://datatracker.ietf.org/doc/html/rfc4180#section-2 规范,末尾换行符可有可无。 |
CsvWriteConfig |
setLineDelimiter(char[] lineDelimiter)
设置换行符
|
addHeaderAlias, disableComment, removeHeaderAlias, setCommentCharacter, setFieldSeparator, setHeaderAlias, setTextDelimiter
protected boolean alwaysDelimitText
protected char[] lineDelimiter
protected boolean endingLineBreak
public static CsvWriteConfig defaultConfig()
public CsvWriteConfig setAlwaysDelimitText(boolean alwaysDelimitText)
alwaysDelimitText
- 是否始终使用文本分隔符,文本包装符,默认false,按需添加public CsvWriteConfig setLineDelimiter(char[] lineDelimiter)
lineDelimiter
- 换行符public CsvWriteConfig setEndingLineBreak(boolean endingLineBreak)
endingLineBreak
- 文件末尾是否添加换行符Copyright © 2024. All rights reserved.