fout = new BufferedOutputStream(new FileOutputStream(targetFile));
final ZipRepository zipRepository = new ZipRepository(fout);
final ContentLocation root = zipRepository.getRoot();
final ContentLocation data = RepositoryUtilities.createLocation
(zipRepository, RepositoryUtilities.split(dataDirectory, "/"));
final StreamingReportProcessor sp = new StreamingReportProcessor();
final HtmlOutputProcessor outputProcessor = createOutputProcessor();
final HtmlPrinter printer = outputProcessor.getPrinter();
printer.setContentWriter(root, new DefaultNameGenerator(root, filename));
printer.setDataWriter(data, new DefaultNameGenerator(data, "content"));
printer.setEncoding(encoding);
sp.setOutputProcessor(outputProcessor);
sp.processReport(job);
}
catch(Exception e)
{
DebugLog.log("ZIP-Export failed. ", e);
}