您的位置: 首页 > IT文章 > 文件拷贝的工具类 文件拷贝的工具类 分类: IT文章 • 2024-10-27 20:54:36 String path = parentPath +File.separator + newFileName;File newFile = new File(path);// 把文件读入InputStream stream = spFileName.getInputStream(); org.apache.commons.io.FileUtils.copyInputStreamToFile(stream, newFile);