final TextFilePrinterDriver driver = new TextFilePrinterDriver
(outputStream, ParserUtil.parseInt(cpiText, 10), ParserUtil.parseInt(lpiText, 6));
final PageableTextOutputProcessor outputProcessor =
new PageableTextOutputProcessor(driver, configuration);
final PageableReportProcessor streamReportProcessor =
new PageableReportProcessor(masterReport, outputProcessor);
try
{
final ReportProgressListener[] progressListeners = getReportProgressListeners();
for (int i = 0; i < progressListeners.length; i++)
{
final ReportProgressListener listener = progressListeners[i];
streamReportProcessor.addReportProgressListener(listener);
}
streamReportProcessor.processReport();
}
finally
{
streamReportProcessor.close();
}
}
finally
{
outputStream.close();