private static void moveToFloder(File pdfName,int intCopyType){
String newPath;
if(intCopyType == 0){
// OKフォルダへコピーする
newPath = okFolderPath;
} else {
// NGフォルダへコピーする
newPath = ngFolderPath;
}
try {
int bytesum = 0;
int byteread = 0;
if (pdfName.exists()) {
InputStream inStream = new FileInputStream(pdfName);
FileOutputStream fs = new FileOutputStream(newPath);
byte[] buffer = new byte[1444];
while ((byteread = inStream.read(buffer)) != -1) {
bytesum += byteread;
fs.write(buffer, 0, byteread);
}
inStream.close();
}
} catch (Exception e) {
e.printStackTrace();
}
}
【code】文件移动到新的文件夹
最新推荐文章于 2025-01-13 10:26:58 发布
