return parse(new FileInputStream(file));
}
public RcovResult parse(InputStream input) throws IOException {
try {
RcovResult result = new RcovResult();
Parser parser = initParser(getHtml(input));
TableTag report = getReportTable(parser);
if (report.getRowCount() > 0) {
//row at 0 is the header row, so we have to get the row at 1
TableRow totalRow = report.getRow(1);
TableColumn[] columns = totalRow.getColumns();
result.setTotalLines(getTextFromTT(columns[1]));
result.setCodeLines(getTextFromTT(columns[2]));
result.setTotalCoverage(getTextFromTT(columns[3]));
result.setCodeCoverage(getTextFromTT(columns[4]));
for (int i = 2; i < report.getRowCount(); i++) {
result.addFile(parseRow(report.getRow(i)));
}
}
return result;
} catch (Exception e) {