| Modifier and Type | Field and Description |
|---|---|
static CSVFormat |
CSVFormat.DEFAULT
Standard Comma Separated Value format, as for
RFC4180 but allowing empty lines. |
static CSVFormat |
CSVFormat.EXCEL
Excel file format (using a comma as the value delimiter).
|
static CSVFormat |
CSVFormat.INFORMIX_UNLOAD
Default Informix CSV UNLOAD format used by the
UNLOAD TO file_name operation. |
static CSVFormat |
CSVFormat.INFORMIX_UNLOAD_CSV
Default Informix CSV UNLOAD format used by the
UNLOAD TO file_name operation (escaping is disabled.) |
static CSVFormat |
CSVFormat.MYSQL
Default MySQL format used by the
SELECT INTO OUTFILE and LOAD DATA INFILE operations. |
static CSVFormat |
CSVFormat.ORACLE
Default Oracle format used by the SQL*Loader utility.
|
static CSVFormat |
CSVFormat.POSTGRESQL_CSV
Default PostgreSQL CSV format used by the
COPY operation. |
static CSVFormat |
CSVFormat.POSTGRESQL_TEXT
Default PostgreSQL text format used by the
COPY operation. |
static CSVFormat |
CSVFormat.RFC4180
Comma separated format as defined by RFC 4180.
|
static CSVFormat |
CSVFormat.TDF
Tab-delimited format.
|
| Modifier and Type | Method and Description |
|---|---|
CSVFormat |
CSVFormat.Predefined.getFormat()
Gets the format.
|
static CSVFormat |
CSVFormat.newFormat(char delimiter)
Creates a new CSV format with the specified delimiter.
|
static CSVFormat |
CSVFormat.valueOf(String format)
Gets one of the predefined formats from
CSVFormat.Predefined. |
CSVFormat |
CSVFormat.withAllowMissingColumnNames()
Returns a new
CSVFormat with the missing column names behavior of the format set to true |
CSVFormat |
CSVFormat.withAllowMissingColumnNames(boolean allowMissingColumnNames)
Returns a new
CSVFormat with the missing column names behavior of the format set to the given value. |
CSVFormat |
CSVFormat.withAutoFlush(boolean autoFlush)
Returns a new
CSVFormat with whether to flush on close. |
CSVFormat |
CSVFormat.withCommentMarker(char commentMarker)
Returns a new
CSVFormat with the comment start marker of the format set to the specified character. |
CSVFormat |
CSVFormat.withCommentMarker(Character commentMarker)
Returns a new
CSVFormat with the comment start marker of the format set to the specified character. |
CSVFormat |
CSVFormat.withDelimiter(char delimiter)
Returns a new
CSVFormat with the delimiter of the format set to the specified character. |
CSVFormat |
CSVFormat.withEscape(char escape)
Returns a new
CSVFormat with the escape character of the format set to the specified character. |
CSVFormat |
CSVFormat.withEscape(Character escape)
Returns a new
CSVFormat with the escape character of the format set to the specified character. |
CSVFormat |
CSVFormat.withFirstRecordAsHeader()
Returns a new
CSVFormat using the first record as header. |
CSVFormat |
CSVFormat.withHeader(Class<? extends Enum<?>> headerEnum)
Returns a new
CSVFormat with the header of the format defined by the enum class. |
CSVFormat |
CSVFormat.withHeader(ResultSet resultSet)
Returns a new
CSVFormat with the header of the format set from the result set metadata. |
CSVFormat |
CSVFormat.withHeader(ResultSetMetaData metaData)
Returns a new
CSVFormat with the header of the format set from the result set metadata. |
CSVFormat |
CSVFormat.withHeader(String... header)
Returns a new
CSVFormat with the header of the format set to the given values. |
CSVFormat |
CSVFormat.withHeaderComments(Object... headerComments)
Returns a new
CSVFormat with the header comments of the format set to the given values. |
CSVFormat |
CSVFormat.withIgnoreEmptyLines()
Returns a new
CSVFormat with the empty line skipping behavior of the format set to true. |
CSVFormat |
CSVFormat.withIgnoreEmptyLines(boolean ignoreEmptyLines)
Returns a new
CSVFormat with the empty line skipping behavior of the format set to the given value. |
CSVFormat |
CSVFormat.withIgnoreHeaderCase()
Returns a new
CSVFormat with the header ignore case behavior set to true. |
CSVFormat |
CSVFormat.withIgnoreHeaderCase(boolean ignoreHeaderCase)
Returns a new
CSVFormat with whether header names should be accessed ignoring case. |
CSVFormat |
CSVFormat.withIgnoreSurroundingSpaces()
Returns a new
CSVFormat with the trimming behavior of the format set to true. |
CSVFormat |
CSVFormat.withIgnoreSurroundingSpaces(boolean ignoreSurroundingSpaces)
Returns a new
CSVFormat with the trimming behavior of the format set to the given value. |
CSVFormat |
CSVFormat.withNullString(String nullString)
Returns a new
CSVFormat with conversions to and from null for strings on input and output. |
CSVFormat |
CSVFormat.withQuote(char quoteChar)
Returns a new
CSVFormat with the quoteChar of the format set to the specified character. |
CSVFormat |
CSVFormat.withQuote(Character quoteChar)
Returns a new
CSVFormat with the quoteChar of the format set to the specified character. |
CSVFormat |
CSVFormat.withQuoteMode(QuoteMode quoteModePolicy)
Returns a new
CSVFormat with the output quote policy of the format set to the specified value. |
CSVFormat |
CSVFormat.withRecordSeparator(char recordSeparator)
Returns a new
CSVFormat with the record separator of the format set to the specified character. |
CSVFormat |
CSVFormat.withRecordSeparator(String recordSeparator)
Returns a new
CSVFormat with the record separator of the format set to the specified String. |
CSVFormat |
CSVFormat.withSkipHeaderRecord()
Returns a new
CSVFormat with skipping the header record set to true. |
CSVFormat |
CSVFormat.withSkipHeaderRecord(boolean skipHeaderRecord)
Returns a new
CSVFormat with whether to skip the header record. |
CSVFormat |
CSVFormat.withSystemRecordSeparator()
Returns a new
CSVFormat with the record separator of the format set to the operating system's line
separator string, typically CR+LF on Windows and LF on Linux. |
CSVFormat |
CSVFormat.withTrailingDelimiter()
Returns a new
CSVFormat to add a trailing delimiter. |
CSVFormat |
CSVFormat.withTrailingDelimiter(boolean trailingDelimiter)
Returns a new
CSVFormat with whether to add a trailing delimiter. |
CSVFormat |
CSVFormat.withTrim()
Returns a new
CSVFormat to trim leading and trailing blanks. |
CSVFormat |
CSVFormat.withTrim(boolean trim)
Returns a new
CSVFormat with whether to trim leading and trailing blanks. |
| Modifier and Type | Method and Description |
|---|---|
static CSVParser |
CSVParser.parse(File file,
Charset charset,
CSVFormat format)
Creates a parser for the given
File. |
static CSVParser |
CSVParser.parse(InputStream inputStream,
Charset charset,
CSVFormat format)
Creates a CSV parser using the given
CSVFormat. |
static CSVParser |
CSVParser.parse(Path path,
Charset charset,
CSVFormat format)
Creates a parser for the given
Path. |
static CSVParser |
CSVParser.parse(Reader reader,
CSVFormat format)
Creates a CSV parser using the given
CSVFormat
If you do not read all records from the given reader, you should call CSVParser.close() on the parser,
unless you close the reader. |
static CSVParser |
CSVParser.parse(String string,
CSVFormat format)
Creates a parser for the given
String. |
static CSVParser |
CSVParser.parse(URL url,
Charset charset,
CSVFormat format)
Creates a parser for the given URL.
|
| Constructor and Description |
|---|
CSVParser(Reader reader,
CSVFormat format)
Customized CSV parser using the given
CSVFormat
If you do not read all records from the given reader, you should call CSVParser.close() on the parser,
unless you close the reader. |
CSVParser(Reader reader,
CSVFormat format,
long characterOffset,
long recordNumber)
Customized CSV parser using the given
CSVFormat
If you do not read all records from the given reader, you should call CSVParser.close() on the parser,
unless you close the reader. |
CSVPrinter(Appendable out,
CSVFormat format)
Creates a printer that will print values to the given stream following the CSVFormat.
|
Copyright © 2018 The Apache Software Foundation. All rights reserved.