From 31c362cd87a2a4c535797630f1135dc2a25f7ab7 Mon Sep 17 00:00:00 2001 From: zhuangjiaju Date: Mon, 19 Aug 2019 20:54:47 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E8=AF=BB=E5=86=99=E9=80=BB?= =?UTF-8?q?=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../converters/inputstream/InputStreamImageConverter.java | 4 ++-- src/main/java/com/alibaba/excel/util/FileUtils.java | 2 +- .../com/alibaba/excel/util/{IOUtils.java => IoUtils.java} | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) rename src/main/java/com/alibaba/excel/util/{IOUtils.java => IoUtils.java} (98%) diff --git a/src/main/java/com/alibaba/excel/converters/inputstream/InputStreamImageConverter.java b/src/main/java/com/alibaba/excel/converters/inputstream/InputStreamImageConverter.java index 0e28b410..abc2fe68 100644 --- a/src/main/java/com/alibaba/excel/converters/inputstream/InputStreamImageConverter.java +++ b/src/main/java/com/alibaba/excel/converters/inputstream/InputStreamImageConverter.java @@ -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 { @Override public CellData convertToExcelData(InputStream value, ExcelContentProperty contentProperty, GlobalConfiguration globalConfiguration) throws IOException { - return new CellData(IOUtils.toByteArray(value)); + return new CellData(IoUtils.toByteArray(value)); } } diff --git a/src/main/java/com/alibaba/excel/util/FileUtils.java b/src/main/java/com/alibaba/excel/util/FileUtils.java index 26327b3a..717ddfe3 100644 --- a/src/main/java/com/alibaba/excel/util/FileUtils.java +++ b/src/main/java/com/alibaba/excel/util/FileUtils.java @@ -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(); } diff --git a/src/main/java/com/alibaba/excel/util/IOUtils.java b/src/main/java/com/alibaba/excel/util/IoUtils.java similarity index 98% rename from src/main/java/com/alibaba/excel/util/IOUtils.java rename to src/main/java/com/alibaba/excel/util/IoUtils.java index dc41531d..9405c91d 100644 --- a/src/main/java/com/alibaba/excel/util/IOUtils.java +++ b/src/main/java/com/alibaba/excel/util/IoUtils.java @@ -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