StringWriter writer = new StringWriter(); ProjectStats stats = getProjectStats(); stats.transformSummaryToHTML(writer);  String html = writer.toString();  bugCollection.setSummaryHTML(html); bugCollection.writeXML(outputStream, project);
generateSummary(); getBugCollection().writeXML(outputStream, getProject());
	public void finish() {		try {			StringWriter writer = new StringWriter();			ProjectStats stats = getProjectStats();			stats.transformSummaryToHTML(writer);			String html = writer.toString();			bugCollection.setSummaryHTML(html);			bugCollection.writeXML(outputStream, project);		} catch (Exception e) {			logError("Couldn't write XML output: " + e.toString());		}	}