Constructor and Description |
---|
Format()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
CSV.Format |
alwaysEscapeOutput()
Indicates that the escape sequence should always be
used when writing values.
|
CSV.Format |
clone() |
CSV.Format |
escape(char e)
Set escape character.
|
CSV.Format |
hasHeader()
Indicates that CSV file has header.
|
CSV.Format |
lineComment(char lcc)
Set line comment character.
|
CSV.Format |
lineComment(String lcs)
Deprecated.
As of release 1.4, replaced by
lineComment(char) . |
CSV.Format |
lineSeparator(CSV.LineSeparator ls)
Set line separator.
|
CSV.Format |
nullValue(String s)
Set string for representing NULL values.
|
CSV.Format |
overrideConversion(JDBCType type,
Function<String,?> conv)
Override input conversion for given JDBC type.
|
CSV.Format |
separator(char s)
Set separator.
|
CSV.Format |
separator(String s)
Deprecated.
As of release 1.4, replaced by
separator(char) . |
CSV.Format |
useReadConversions()
Indicates that string conversions should be used in
conjunction with
JDBDT.read(DataSource,CSV.Format,File) . |
@Deprecated public CSV.Format separator(String s)
separator(char)
.","
).s
- Separator string (usually formed by just one character).public CSV.Format separator(char s)
','
).s
- Separator character to use.public CSV.Format escape(char e)
By default the separator is the double quote character ("
).
Note that escaping follows the RFC-4180
convention, except for the possibility of having line breaks and carriage returns within
escaped sequences.
e
- Character to use as escape character.@Deprecated public CSV.Format lineComment(String lcs)
lineComment(char)
.lcs
- Line comment sequence (should contain one character, call has been deprecated).public CSV.Format lineComment(char lcc)
lcc
- Line comment character.public CSV.Format lineSeparator(CSV.LineSeparator ls)
CSV.LineSeparator.SYSTEM_DEFAULT
.ls
- Line separator to use.public CSV.Format nullValue(String s)
s
- Line comment sequence (usually formed by just one character).public CSV.Format hasHeader()
public CSV.Format useReadConversions()
JDBDT.read(DataSource,CSV.Format,File)
.
Standard built-in conversions will be used, which may be
overridden for specific JDBC types with overrideConversion(java.sql.JDBCType, java.util.function.Function<java.lang.String, ?>)
If this option is not set, then data rows read from a CSV file
will consist only of values of type String
, without
any conversion being performed.
public CSV.Format overrideConversion(JDBCType type, Function<String,?> conv)
type
- JDBC type.conv
- Conversion function.useReadConversions()
public CSV.Format alwaysEscapeOutput()
public CSV.Format clone()
Copyright © 2016–2021 JDBDT. All rights reserved.