public class CsvBeanWriter<T> extends BaseCsvWriter<String,T>
capacity, defaultValue, mapping, maxColumnIndex, skipNullRows, writer
Constructor and Description |
---|
CsvBeanWriter(CsvWriter writer,
Class<T> targetClass) |
CsvBeanWriter(File file,
Class<T> targetClass) |
CsvBeanWriter(OutputStream out,
Class<T> targetClass) |
CsvBeanWriter(String file,
Class<T> targetClass) |
CsvBeanWriter(Writer writer,
Class<T> targetClass) |
Modifier and Type | Method and Description |
---|---|
static <T> CsvBeanWriter<T> |
create(CsvWriter writer,
Class<T> targetClass) |
static <T> CsvBeanWriter<T> |
create(File file,
Class<T> targetClass) |
static <T> CsvBeanWriter<T> |
create(OutputStream out,
Class<T> targetClass) |
static <T> CsvBeanWriter<T> |
create(String file,
Class<T> targetClass) |
static <T> CsvBeanWriter<T> |
create(Writer writer,
Class<T> targetClass) |
protected void |
indexToSort()
将index作为排序字段
|
CsvBeanWriter<T> |
mapping(int column,
String field) |
protected void |
parseClass()
解析class
|
protected void |
parseColumn(ExportField field,
ExportIgnore ignore,
Method method,
String fieldName)
解析列
|
protected void |
parseField()
解析field
|
protected String[] |
parseRow(T row)
解析行
|
addComment, addComments, addRow, addRows, capacity, capacityStore, close, defaultValue, flush, getCapacity, getOption, getWriter, headers, mapping, skip, skip, skipNullRows
public CsvBeanWriter(OutputStream out, Class<T> targetClass)
public static <T> CsvBeanWriter<T> create(String file, Class<T> targetClass)
public static <T> CsvBeanWriter<T> create(File file, Class<T> targetClass)
public static <T> CsvBeanWriter<T> create(OutputStream out, Class<T> targetClass)
public static <T> CsvBeanWriter<T> create(Writer writer, Class<T> targetClass)
public static <T> CsvBeanWriter<T> create(CsvWriter writer, Class<T> targetClass)
public CsvBeanWriter<T> mapping(int column, String field)
mapping
in class BaseCsvWriter<String,T>
protected String[] parseRow(T row)
BaseCsvWriter
parseRow
in class BaseCsvWriter<String,T>
row
- 行protected void parseClass()
protected void parseField()
protected void parseColumn(ExportField field, ExportIgnore ignore, Method method, String fieldName)
field
- fieldignore
- ignoremethod
- getterfieldName
- fieldNameprotected void indexToSort()
Copyright © 2024. All rights reserved.