Code example for BufferedOutputStream

Methods: flush

0
        final File tempFile = File.createTempFile("report-designer-preview", ".xls");//$NON-NLS-1$
        tempFile.deleteOnExit();
        final FileOutputStream fout = new FileOutputStream(tempFile);
        try 
        { 
          final BufferedOutputStream bout = new BufferedOutputStream(fout);
          final FlowExcelOutputProcessor target =
              new FlowExcelOutputProcessor(report.getConfiguration(), bout, report.getResourceManager());
          target.setUseXlsxFormat(false);
          final FlowReportProcessor reportProcessor = new FlowReportProcessor(report, target);
 
          reportProcessor.addReportProgressListener(progressDialog);
          progressDialog.setVisibleInEDT(true);
 
          reportProcessor.processReport();
          reportProcessor.close();
          bout.flush();
          reportProcessor.removeReportProgressListener(progressDialog);
        } 
        finally 
        { 
          fout.close();
Contextual code suggestions in your IDE  Get Codota for Java