人工交互模块保存文件代码修改

This commit is contained in:
qiaoqinzheng 2024-03-15 11:12:57 +08:00
parent 1408424893
commit 29821e708d

View File

@ -288,7 +288,7 @@ public class FTPUtil {
//声明目标文件
File targetFile = new File(filePath);
//创建输出流
BufferedOutputStream outputStream = null;
FileOutputStream outputStream = null;
try {
//获取父级路径
File directory = targetFile.getParentFile();
@ -297,7 +297,7 @@ public class FTPUtil {
directory.mkdirs();
}
// 创建输出流对象并写入数据到文件
outputStream = new BufferedOutputStream(new FileOutputStream(targetFile));
outputStream = new FileOutputStream(targetFile);
byte[] buffer = new byte[1024];
int length;
while ((length = inputStream.read(buffer)) > 0) {