CoverageIOUtil.copy(HTMLCoverageReport.class.getResourceAsStream(BLANK_PNG), new FileOutputStream(outputDir + File.separator + BLANK_PNG));
CoverageIOUtil.copy(HTMLCoverageReport.class.getResourceAsStream(UPSIMPLE_PNG), new FileOutputStream(outputDir + File.separator + UPSIMPLE_PNG));
CoverageIOUtil.write(CoverageIOUtil.toString(HTMLCoverageReport.class.getResourceAsStream(CUSTOM_JS)), new File(outputDir + File.separator + CUSTOM_JS).toURI());
CoverageIOUtil.write(CoverageIOUtil.toString(HTMLCoverageReport.class.getResourceAsStream(SOURCE_VIEWER_CSS)), new File(outputDir + File.separator + SOURCE_VIEWER_CSS).toURI());
} catch (Exception e) {
throw new XSLTCoverageException("could not write frame-summary data to file!", e);
}
String xml = null;
calculateCoveragePercentage(coverageMap);
XSLTToHTMLReport report = null;
for (CoverageFile file : coverageMap.values()) {
try {
report = new XSLTToHTMLReport();
xml = CoverageIOUtil.toString(new FileInputStream(new File(file.getUri())));
CoverageIOUtil.write(report.build(file, xml), new FileOutputStream(outputDir + File.separator + file.getFileName() + HTML_EXT));
} catch (Exception e) {
throw new XSLTCoverageException("could not write the XSL report(s)!", e);
}
}
}