
com.gitee.cliveyuan.tools.data.csv.CsvWriter Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of java-tools Show documentation
Show all versions of java-tools Show documentation
Some commonly used methods in java
package com.gitee.cliveyuan.tools.data.csv;
import lombok.Builder;
import lombok.Data;
import java.io.Serializable;
import java.nio.charset.StandardCharsets;
import java.util.Collection;
/**
* @author Clive Yuan
* @date 2020/06/22
*/
@Data
@Builder
public class CsvWriter implements Serializable {
/**
* 抬头 (要与数据中的属性顺序和数量对应)
*/
private String[] headers;
/**
* 数据
*/
private Collection data;
/**
* 导出的文件路径
*/
private String filePath;
/**
* 编码格式: 默认UTF-8
*/
@Builder.Default
private String encoding = StandardCharsets.UTF_8.displayName();
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy