@Override public void close() throws IOException { if (null != primaryOut) { primaryOut.close(); } try (@javax.annotation.Nonnull PrintWriter out = new PrintWriter(new FileOutputStream(getReportFile()))) { write(out); } File root = getRoot(); write(); writeZip(root, getName().toString()); onComplete.stream().forEach(fn -> { try { fn.run(); } catch (Throwable e) { log.info("Error closing log", e); } }); }
if (null != httpd) httpd.addGET("", "text/html", out -> { try { write(); try (FileInputStream input = new FileInputStream(new File(getRoot(), getName() + ".html"))) { IOUtils.copy(input, out); if (null != httpd) httpd.addGET("pdf", "application/pdf", out -> { try { write(); try (FileInputStream input = new FileInputStream(new File(getRoot(), getName() + ".pdf"))) { IOUtils.copy(input, out);
@Override public void close() throws IOException { if (null != primaryOut) { primaryOut.close(); } try (@javax.annotation.Nonnull PrintWriter out = new PrintWriter(new FileOutputStream(getReportFile()))) { write(out); } File root = getRoot(); write(); writeZip(root, getName().toString()); onComplete.stream().forEach(fn -> { try { fn.run(); } catch (Throwable e) { log.info("Error closing log", e); } }); }
if (null != httpd) httpd.addGET("", "text/html", out -> { try { write(); try (FileInputStream input = new FileInputStream(new File(getRoot(), getName() + ".html"))) { IOUtils.copy(input, out); if (null != httpd) httpd.addGET("pdf", "application/pdf", out -> { try { write(); try (FileInputStream input = new FileInputStream(new File(getRoot(), getName() + ".pdf"))) { IOUtils.copy(input, out);
subreport.write(); try (FileInputStream input = new FileInputStream(new File(root, subreport.getName() + ".html"))) { IOUtils.copy(input, out); getHttpd().addGET(reportName + ".pdf", "application/pdf", out -> { try { subreport.write(); try (FileInputStream input = new FileInputStream(new File(root, subreport.getName() + ".pdf"))) { IOUtils.copy(input, out);
subreport.write(); try (FileInputStream input = new FileInputStream(new File(root, subreport.getName() + ".html"))) { IOUtils.copy(input, out); getHttpd().addGET(reportName + ".pdf", "application/pdf", out -> { try { subreport.write(); try (FileInputStream input = new FileInputStream(new File(root, subreport.getName() + ".pdf"))) { IOUtils.copy(input, out);