public final class CsvParser
extends java.lang.Object
implements java.io.Closeable
| 构造器和说明 |
|---|
CsvParser(java.io.Reader reader,
CsvReadConfig config)
CSV解析器
|
| 限定符和类型 | 方法和说明 |
|---|---|
void |
close() |
java.util.List<java.lang.String> |
getHeader()
获取头部字段列表,如果containsHeader设置为false则抛出异常
|
CsvRow |
nextRow()
读取下一行数据
|
public CsvParser(java.io.Reader reader,
CsvReadConfig config)
reader - Readerconfig - 配置,null则为默认配置public java.util.List<java.lang.String> getHeader()
java.lang.IllegalStateException - 如果不解析头部或者没有调用nextRow()方法public CsvRow nextRow() throws IORuntimeException
IORuntimeException - IO读取异常public void close()
throws java.io.IOException
close 在接口中 java.io.Closeableclose 在接口中 java.lang.AutoCloseablejava.io.IOExceptionCopyright © 2018. All rights reserved.