
commons.box.app.misc.CSV Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of commons-box-app Show documentation
Show all versions of commons-box-app Show documentation
Common utils for BOX projects.
The newest version!
package commons.box.app.misc;
import commons.box.app.AppError;
import commons.box.util.IOs;
import commons.box.util.Langs;
import commons.box.util.Strs;
import org.apache.commons.csv.CSVFormat;
import org.apache.commons.csv.CSVRecord;
import java.io.*;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.function.Consumer;
/**
* CSV解析对象
* 创建作者:xingxiuyi
* 版权所属:xingxiuyi
*/
public class CSV {
private static final CSVFormat DEFAULT = CSVFormat.EXCEL.withHeader();
private final CSVFormat format;
public CSV(CSVFormat format) {
this.format = ((format == null) ? DEFAULT : format);
}
/**
* 原始格式化工具
*
* @return
*/
public CSVFormat format() {
return format;
}
/**
* 以List方式输出所有内容 默认UTF-8
*
* @param file
* @return
* @throws AppError
*/
public List
© 2015 - 2025 Weber Informatics LLC | Privacy Policy