diff --git a/src/main/java/cokr/xit/base/file/FileInfo.java b/src/main/java/cokr/xit/base/file/FileInfo.java index 686bf82..7358c0e 100644 --- a/src/main/java/cokr/xit/base/file/FileInfo.java +++ b/src/main/java/cokr/xit/base/file/FileInfo.java @@ -14,8 +14,6 @@ import java.util.List; import java.util.stream.Collectors; import java.util.stream.Stream; -import org.springframework.util.FileCopyUtils; - import cokr.xit.foundation.AbstractComponent; import cokr.xit.foundation.AbstractEntity; import cokr.xit.foundation.Assert; @@ -530,12 +528,12 @@ public class FileInfo extends AbstractEntity { * */ public boolean write(OutputStream out) { - if (Assert.isEmpty(path) || out == null) return false; + if (out == null) return false; try ( InputStream in = getInputStream(); ) { - FileCopyUtils.copy(in, out); + in.transferTo(out); return true; } catch (Exception e) { throw Assert.runtimeException(e);