if (arch != null) {
if (arch.isEncrypted()) {
logger.warn("archive is encrypted cannot extreact");
return;
}
FileHeader fh = null;
while (true) {
fh = arch.nextFileHeader();
if (fh == null) {
break;
}
if (fh.isEncrypted()) {
logger.warn("file is encrypted cannot extract: "
+ fh.getFileNameString());
continue;
}
logger.info("extracting: " + fh.getFileNameString());
try {
if (fh.isDirectory()) {
createDirectory(fh, destination);
} else {
File f = createFile(fh, destination);
OutputStream stream = new FileOutputStream(f);
arch.extractFile(fh, stream);