write(templateName, report, file);
}
public void write(String templateName, Object report, File file) {
try {
Template template = cfg.getTemplate(templateName);
FileOutputStream os = new FileOutputStream(file);
OutputStreamWriter out = new OutputStreamWriter(os);
template.process(report, out);
out.close();
} catch (IOException e) {
throw new RuntimeException(e);
} catch (TemplateException e) {
throw new RuntimeException(e);