} catch (IOException e) {
Logger.logError(e);
}
}
if (out != null) {
BattleResultsTableModel resultsTable = new BattleResultsTableModel(event.getSortedResults(),
event.getBattleRules().getNumRounds());
ByteArrayOutputStream baos = new ByteArrayOutputStream();
resultsTable.print(new PrintStream(baos));
out.append(StringUtil.toBasicLatin(baos.toString()));
}
} finally {
FileUtil.cleanupStream(out);
FileUtil.cleanupStream(fos);