Code example for BufferedOutputStream

Methods: flush

0
        final File tempFile = File.createTempFile("report-designer-preview", ".pdf");//$NON-NLS-1$
        tempFile.deleteOnExit();
        final FileOutputStream fout = new FileOutputStream(tempFile);
        try 
        { 
          final BufferedOutputStream bout = new BufferedOutputStream(fout);
          final PdfOutputProcessor outputProcessor = new PdfOutputProcessor(report.getConfiguration(), bout,
              report.getResourceManager());
          final PageableReportProcessor reportProcessor = new PageableReportProcessor(report, outputProcessor);
 
          reportProcessor.addReportProgressListener(progressDialog);
          progressDialog.setVisibleInEDT(true);
 
          reportProcessor.processReport();
          reportProcessor.close();
          bout.flush();
          reportProcessor.removeReportProgressListener(progressDialog);
        } 
        finally 
        { 
          fout.close();
Connect your IDE to all the code out there  Get Codota for Java