ZipArchiveEntry zipEntry = new ZipArchiveEntry(entryName);
newZipStream.putArchiveEntry(zipEntry);
while ((bytesRead = currentFileStream.read(buffer))!= -1) {
newZipStream.write(buffer, 0, bytesRead);
}
newZipStream.closeArchiveEntry();
} else {
logger.debug("Adding entries from compressed file...");
//read the entries from the zip file and copy them to the new zip archive
//so that we don't have to recompress them.
ZipArchiveInputStream currentZipStream = new ZipArchiveInputStream(currentFileStream);