提交 31c362cd 编写于 作者: Z zhuangjiaju

优化读写逻辑

上级 1e5f9dcb
......@@ -8,7 +8,7 @@ import com.alibaba.excel.enums.CellDataTypeEnum;
import com.alibaba.excel.metadata.CellData;
import com.alibaba.excel.metadata.GlobalConfiguration;
import com.alibaba.excel.metadata.property.ExcelContentProperty;
import com.alibaba.excel.util.IOUtils;
import com.alibaba.excel.util.IoUtils;
/**
* File and image converter
......@@ -35,7 +35,7 @@ public class InputStreamImageConverter implements Converter<InputStream> {
@Override
public CellData convertToExcelData(InputStream value, ExcelContentProperty contentProperty,
GlobalConfiguration globalConfiguration) throws IOException {
return new CellData(IOUtils.toByteArray(value));
return new CellData(IoUtils.toByteArray(value));
}
}
......@@ -36,7 +36,7 @@ public class FileUtils {
InputStream in = openInputStream(file);
try {
final long fileLength = file.length();
return fileLength > 0 ? IOUtils.toByteArray(in, (int)fileLength) : IOUtils.toByteArray(in);
return fileLength > 0 ? IoUtils.toByteArray(in, (int)fileLength) : IoUtils.toByteArray(in);
} finally {
in.close();
}
......
......@@ -10,7 +10,7 @@ import java.io.OutputStream;
*
* @author Jiaju Zhuang
*/
public class IOUtils {
public class IoUtils {
public static final int EOF = -1;
/**
* The default buffer size ({@value}) to use for
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册