public final class CSVFormat extends Object
Modifier and Type | Class and Description |
---|---|
static class |
CSVFormat.Quote
When to apply the quote
|
Constructor and Description |
---|
CSVFormat() |
Modifier and Type | Method and Description |
---|---|
String |
delimiter()
The delimiter to be used between CSV cells, defaulting to
"," . |
CSVFormat |
delimiter(char newDelimiter)
The delimiter to be used between CSV cells, defaulting to
"," . |
CSVFormat |
delimiter(String newDelimiter)
The delimiter to be used between CSV cells, defaulting to
"," . |
String |
emptyString()
The string to be used for
"" values, defaulting to the
empty string. |
CSVFormat |
emptyString(String newEmptyString)
The string to be used for
"" values, defaulting to the
empty string. |
boolean |
header()
Whether to emit a header row with column names, defaulting to
true . |
CSVFormat |
header(boolean newHeader)
Whether to emit a header row with column names, defaulting to
true . |
String |
newline()
The string to be used to separate rows, defaulting to
\n . |
CSVFormat |
newline(String newNewline)
The string to be used to separate rows, defaulting to
\n . |
String |
nullString()
The string to be used for
null values, defaulting to the
empty string. |
CSVFormat |
nullString(String newNullString)
The string to be used for
null values, defaulting to the
empty string. |
CSVFormat.Quote |
quote()
When to quote CSV content.
|
CSVFormat |
quote(CSVFormat.Quote newQuote)
When to quote CSV content.
|
String |
quoteString()
The string used to quote values according to the rules specified in
quote() . |
CSVFormat |
quoteString(String newQuoteString)
The string used to quote values according to the rules specified in
quote() . |
public CSVFormat delimiter(String newDelimiter)
","
.
Using "," |
a,b,c |
Using ";" |
a;b;c |
public CSVFormat delimiter(char newDelimiter)
","
.
Using "," |
a,b,c |
Using ";" |
a;b;c |
public String delimiter()
","
.
Using "," |
a,b,c |
Using ";" |
a;b;c |
public CSVFormat nullString(String newNullString)
null
values, defaulting to the
empty string.
Using "" |
a,,c |
Using "\"\"" |
a,"",c |
Using "{null}" |
a,{null},c |
public String nullString()
null
values, defaulting to the
empty string.
Using "" |
a,,c |
Using "\"\"" |
a,"",c |
Using "{null}" |
a,{null},c |
public CSVFormat emptyString(String newEmptyString)
""
values, defaulting to the
empty string.
Using "" |
a,,c |
Using "\"\"" |
a,"",c |
public String emptyString()
""
values, defaulting to the
empty string.
Using "" |
a,,c |
Using "\"\"" |
a,"",c |
public CSVFormat newline(String newNewline)
\n
.public String newline()
\n
.public CSVFormat quoteString(String newQuoteString)
quote()
.public String quoteString()
quote()
.public CSVFormat quote(CSVFormat.Quote newQuote)
public CSVFormat.Quote quote()
public CSVFormat header(boolean newHeader)
true
.public boolean header()
true
.Copyright © 2017. All Rights Reserved.