人工交互模块保存文件代码修改
This commit is contained in:
parent
1408424893
commit
29821e708d
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user