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

com.y3tu.tool.poi.excel.sax.AbstractExcelSaxReader Maven / Gradle / Ivy

package com.y3tu.tool.poi.excel.sax;

import com.y3tu.tool.core.io.FileUtil;
import com.y3tu.tool.poi.exceptions.POIException;

import java.io.File;
import java.io.InputStream;


/**
 * 抽象的Sax方式Excel读取器,提供一些共用方法
 *
 * @param  子对象类型,用于标记返回值this
 * @author looly
 */
public abstract class AbstractExcelSaxReader implements ExcelSaxReader {

    @Override
    public T read(String path) throws POIException {
        return read(FileUtil.file(path));
    }

    @Override
    public T read(File file) throws POIException {
        return read(file, -1);
    }

    @Override
    public T read(InputStream in) throws POIException {
        return read(in, -1);
    }

    @Override
    public T read(String path, int sheetIndex) throws POIException {
        return read(FileUtil.file(path), sheetIndex);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy