public interface CsvReader
| 限定符和类型 | 方法和说明 |
|---|---|
char |
getFieldSeparator()
字段分割符, 默认 ','
|
char |
getTextDelimiter()
获取文本包装符, 默认 '"'
|
boolean |
isContainHeader()
是否包含header
|
boolean |
isErrorIfDifferentFieldCount()
如果csv数据含有不匹配的字段数,是否抛出异常, 默认false
|
boolean |
isSkipEmptyRow()
是否跳过空行
|
CsvReaderParser |
parse(java.io.File file)
默认UTF8,获取解析csv文件的核心类
|
CsvReaderParser |
parse(java.io.File file,
java.nio.charset.Charset charset)
获取解析csv文件的核心类
|
CsvReaderParser |
parse(java.nio.file.Path path)
默认UTF8,获取解析csv文件的核心类
|
CsvReaderParser |
parse(java.nio.file.Path path,
java.nio.charset.Charset charset)
获取解析csv文件的核心类
|
CsvReaderParser |
parse(java.io.Reader reader)
获取解析csv文件的核心类
|
CsvSheet |
read(java.io.File file)
默认UTF8读取csv文件
|
CsvSheet |
read(java.io.File file,
java.nio.charset.Charset charset)
读取csv文件
|
CsvSheet |
read(java.nio.file.Path path)
默认UTF8读取csv文件
|
CsvSheet |
read(java.nio.file.Path path,
java.nio.charset.Charset charset)
读取csv文件
|
CsvSheet |
read(java.io.Reader reader)
读取csv文件
|
char getFieldSeparator()
char getTextDelimiter()
boolean isContainHeader()
boolean isSkipEmptyRow()
boolean isErrorIfDifferentFieldCount()
CsvSheet read(java.io.File file, java.nio.charset.Charset charset) throws java.io.IOException
file - csv文件charset - 读取编码java.io.IOException - I/O异常CsvSheet read(java.io.File file) throws java.io.IOException
file - csv文件java.io.IOException - I/O异常CsvSheet read(java.nio.file.Path path, java.nio.charset.Charset charset) throws java.io.IOException
path - Pathcharset - 读取编码java.io.IOException - I/O异常CsvSheet read(java.nio.file.Path path) throws java.io.IOException
java.io.IOException - I/O异常CsvSheet read(java.io.Reader reader) throws java.io.IOException
reader - Readerjava.io.IOException - I/O异常CsvReaderParser parse(java.nio.file.Path path, java.nio.charset.Charset charset) throws java.io.IOException
path - Pathcharset - 解析编码CsvReaderParserjava.io.IOException - I/O异常CsvReaderParser parse(java.nio.file.Path path) throws java.io.IOException
path - PathCsvReaderParserjava.io.IOException - I/O异常CsvReaderParser parse(java.io.File file, java.nio.charset.Charset charset) throws java.io.IOException
file - csv文件charset - 解析编码CsvReaderParserjava.io.IOException - I/O异常CsvReaderParser parse(java.io.File file) throws java.io.IOException
file - csv文件CsvReaderParserjava.io.IOException - I/O异常CsvReaderParser parse(java.io.Reader reader) throws java.io.IOException
reader - ReaderCsvReaderParserjava.io.IOException - I/O异常