use of java.util.zip.Adler32 in project processdash by dtuma.
the class MoveProjectWorker method copyFile.
private void copyFile(File oldFile, File newFile) throws MoveProjectException {
try {
FileUtils.copyFile(oldFile, newFile);
long oldSum = FileUtils.computeChecksum(oldFile, new Adler32());
long newSum = FileUtils.computeChecksum(newFile, new Adler32());
if (oldSum == newSum)
return;
} catch (IOException e) {
}
throw new MoveProjectException(MoveProjectWizard.NEWDIR_URI, "cannotCreateFile").append("oldPath", oldFile.getPath()).append("path", newFile.getPath());
}
Aggregations