All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.orion.office.csv.option.CsvWriterOption Maven / Gradle / Ivy

There is a newer version: 1.0.9
Show newest version
package com.orion.office.csv.option;

import java.io.Serializable;
import java.nio.charset.Charset;

/**
 * csv writer 配置项
 *
 * @author Jiahang Li
 * @version 1.0.0
 * @since 2021/1/22 15:18
 */
public class CsvWriterOption extends CsvOption implements Serializable {

    /**
     * 是否强制使用文本限定符 包裹文字
     */
    private boolean forceQualifier;

    public CsvWriterOption() {
        this.forceQualifier = false;
    }

    public CsvWriterOption(char delimiter) {
        this();
        super.delimiter = delimiter;
    }

    public CsvWriterOption(char delimiter, Charset charset) {
        this();
        super.delimiter = delimiter;
        super.charset = charset;
    }

    protected CsvWriterOption(CsvOption csvOption) {
        super(csvOption);
    }

    public boolean isForceQualifier() {
        return forceQualifier;
    }

    public CsvWriterOption setForceQualifier(boolean forceQualifier) {
        this.forceQualifier = forceQualifier;
        return this;
    }

    public CsvReaderOption toReaderOption() {
        return new CsvReaderOption(this);
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy