|
|
|
@ -1037,23 +1037,23 @@ public class IdcServiceImpl implements IdcService {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
FileOutputStream outputStream = new FileOutputStream(filePath + filePathSlash + imagePath+fileName);
|
|
|
|
|
FileOutputStream outputStream = new FileOutputStream(filePath + filePathSlash + imagePath+fileName);
|
|
|
|
|
|
|
|
|
|
byte b[] = new byte[1024];
|
|
|
|
|
byte b[] = new byte[1024];
|
|
|
|
|
|
|
|
|
|
int len = 0;
|
|
|
|
|
while ((len = inputStream.read(b)) != -1) {
|
|
|
|
|
total += len;
|
|
|
|
|
outputStream.write(b, 0, len);
|
|
|
|
|
int len = 0;
|
|
|
|
|
while ((len = inputStream.read(b)) != -1) {
|
|
|
|
|
total += len;
|
|
|
|
|
outputStream.write(b, 0, len);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
outputStream.flush();
|
|
|
|
|
outputStream.close();
|
|
|
|
|
if(!(total>0)) {
|
|
|
|
|
new File(filePath + filePathSlash + imagePath+fileName).delete();
|
|
|
|
|
executeSql("delete from idc_file where filePath='"+fileName+"'");
|
|
|
|
|
}
|
|
|
|
|
outputStream.flush();
|
|
|
|
|
outputStream.close();
|
|
|
|
|
if(!(total>0)) {
|
|
|
|
|
new File(filePath + filePathSlash + imagePath+fileName).delete();
|
|
|
|
|
executeSql("delete from idc_file where filePath='"+fileName+"'");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
|
|
|
|
|