文件拷贝的工具类

String path = parentPath +File.separator + newFileName;
File newFile = new File(path);
// 把文件读入
InputStream stream = spFileName.getInputStream();
org.apache.commons.io.FileUtils.copyInputStreamToFile(stream, newFile);
 
posted @ 2021-05-20 18:17  oc-long  阅读(58)  评论(0编辑  收藏  举报