try {
_logger.log(Level.FINE,
"synchronization.process_command", _request.getMetaFileName());
String baseDir = _request.getBaseDirectory();
Unzipper z = new Unzipper(baseDir);
byte[] zipBytes = _response.getZipBytes();
long checksum = 0;
// if byte exists in response
if (zipBytes != null) {
// render the zip bytes
checksum = z.writeZipBytes(zipBytes);
} else { // handle a re-direct
File tempZip = null;
// DAS and server instance are running on the same machine
// skips download and uses the zip directly
if (isSameHost()) {
String dasZipLoc = _response.getZipLocation();
tempZip = new File(dasZipLoc);
} else {
// download the zip file
tempZip = downloadZip();
}
// render the zip file
if (tempZip != null && tempZip.exists()) {
// ignore response entry for http based impl
z.ignoreEntry(ServletProcessor.RESPONSE_ENTRY_NAME);
checksum = z.writeZipFile(tempZip.getCanonicalPath());
}
}
//assert(_response.getChecksum() == checksum);