generates zip file containing diagnostic report
try {
if (file == null) {
// Generate uniqu name
file = File.separator + target.getDefaultReportDir() +
File.separator +
UniqueNameGenerator.getName(target.getName());
}
String dirTobeArchived = target.getArchiveDir();
// Generate the jar file
FileUtils.jarDirectory(new File(file),dirTobeArchived);
//Delete report folder
FileUtils.deleteFile(dirTobeArchived);
return new java.util.jar.JarFile(file);
} catch (IOException ioe) {
throw new DiagnosticException(ioe.getMessage());
}