public class CsvFormat extends Object
CsvFormat
specifies the format of a CSV file.Modifier and Type | Class and Description |
---|---|
static class |
CsvFormat.FileFormat |
Constructor and Description |
---|
CsvFormat(CsvFormat.FileFormat format)
Constructs a new
CsvFormat instance. |
CsvFormat(String columnSeparator,
char decimalSeparator,
boolean quoteFields,
String lineBreak)
Constructs a new
CsvFormat instance. |
Modifier and Type | Method and Description |
---|---|
String |
getColumnSeparator()
Returns the column separator.
|
DecimalFormat |
getDecimalFormatter()
Returns the decimal formatter.
|
char |
getDecimalSeparator()
Returns the decimal separator character.
|
String |
getLineBreak()
Returns the line break.
|
boolean |
isQuoteFields()
Returns true if fields must be delimited by duoble quotes.
|
public CsvFormat(CsvFormat.FileFormat format) throws IllegalArgumentException
CsvFormat
instance.format
- the FileFormat
to initialize the CSV format.IllegalArgumentException
- if format is CUSTOM
.public CsvFormat(String columnSeparator, char decimalSeparator, boolean quoteFields, String lineBreak)
CsvFormat
instance.columnSeparator
- the column separator.decimalSeparator
- the decimal separator.quoteFields
- true if fields must be delimited by double quotes.lineBreak
- the line break.public String getLineBreak()
public String getColumnSeparator()
public boolean isQuoteFields()
public DecimalFormat getDecimalFormatter()
public char getDecimalSeparator()
Copyright © 2014–2020. All rights reserved.