|
|
|
@ -66,9 +66,6 @@ public class FTPUtil {
|
|
|
|
|
}
|
|
|
|
|
} catch (IOException e) {
|
|
|
|
|
throw e;
|
|
|
|
|
}finally {
|
|
|
|
|
ftpClient.abort();
|
|
|
|
|
ftpClient.disconnect();
|
|
|
|
|
}
|
|
|
|
|
return ftpClient;
|
|
|
|
|
}
|
|
|
|
@ -107,7 +104,6 @@ public class FTPUtil {
|
|
|
|
|
while ((i = is.read(bytes)) != -1) {
|
|
|
|
|
fos.write(bytes, 0, i);
|
|
|
|
|
}
|
|
|
|
|
closeFTPConnect(ftp);
|
|
|
|
|
}
|
|
|
|
|
if(file.length() == 0 || file.length() < 10){
|
|
|
|
|
FileUtils.deleteImageFile(file);
|
|
|
|
@ -129,6 +125,7 @@ public class FTPUtil {
|
|
|
|
|
FileUtils.deleteImageFile(file);
|
|
|
|
|
throw e;
|
|
|
|
|
}
|
|
|
|
|
closeFTPConnect(ftp);
|
|
|
|
|
}
|
|
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|