Package java.io

Examples of java.io.BufferedOutputStream


    if (filename == null)
    {
      throw new NullPointerException();
    }

    OutputStream fout = new BufferedOutputStream(new FileOutputStream(filename));
    try
    {
      final FlowExcelOutputProcessor target =
          new FlowExcelOutputProcessor(report.getConfiguration(), fout, report.getResourceManager());
      target.setUseXlsxFormat(false);
      final FlowReportProcessor reportProcessor = new FlowReportProcessor(report, target);
      reportProcessor.processReport();
      reportProcessor.close();
      fout.close();
      fout = null;
    }
    finally
    {
      if (fout != null)
      {
        try
        {
          fout.close();
        }
        catch (Exception e)
        {
          // ignore
        }
View Full Code Here


    }

    report.getReportConfiguration().setConfigProperty
        ("org.pentaho.reporting.engine.classic.core.modules.output.table.base.StrictLayout", String.valueOf(strict));

    OutputStream fout = new BufferedOutputStream(new FileOutputStream(filename));
    try
    {
      final FlowExcelOutputProcessor target =
          new FlowExcelOutputProcessor(report.getConfiguration(), fout, report.getResourceManager());
      target.setUseXlsxFormat(false);
      final FlowReportProcessor reportProcessor = new FlowReportProcessor(report, target);
      reportProcessor.processReport();
      reportProcessor.close();
      fout.close();
      fout = null;
    }
    finally
    {
      if (fout != null)
      {
        try
        {
          fout.close();
        }
        catch (Exception e)
        {
          // ignore
        }
View Full Code Here

    }

    OutputStream out = null;
    try
    {
      out = new BufferedOutputStream(new FileOutputStream(fileName));
      final boolean retval = createPDF(report, out);
      out.close();
      out = null;
      return retval;
    }
View Full Code Here

      {
        return null;
      }

      final BundleWriterState wizardFileState = new BundleWriterState(state, "wizard-specification.xml");
      final OutputStream outputStream = new BufferedOutputStream(bundle.createEntry(wizardFileState.getFileName(), "text/xml"));
      final DefaultTagDescription tagDescription = new DefaultTagDescription(
          ClassicEngineBoot.getInstance().getGlobalConfig(), WizardCoreModule.TAG_DEF_PREFIX);
      final XmlWriter xmlWriter = new XmlWriter
          (new OutputStreamWriter(outputStream, "UTF-8"), tagDescription, "  ", "\n");
View Full Code Here

        // convert to PNG ...
        final PngEncoder encoder = new PngEncoder(image, true, 0, 9);
        final byte[] data = encoder.pngEncode();

        final BufferedOutputStream out = new BufferedOutputStream
            (new FileOutputStream(fileNameFormated));
        out.write(data);
        out.close();
      }
      return true;
    }
    catch (Exception e)
    {
View Full Code Here

  public boolean savePDF(final MasterReport report, final String fileName)
  {
    OutputStream out = null;
    try
    {
      out = new BufferedOutputStream(new FileOutputStream(new File(fileName)));
      final PdfOutputProcessor outputProcessor = new PdfOutputProcessor(report.getConfiguration(), out,
          report.getResourceManager());
      final PageableReportProcessor proc = new PageableReportProcessor(report, outputProcessor);
      proc.processReport();
View Full Code Here

   */
  public boolean savePlainText(final MasterReport report, final String fileName)
  {
    try
    {
      final BufferedOutputStream fout = new BufferedOutputStream
          (new FileOutputStream(fileName));

      // cpi = 15, lpi = 10
      final TextFilePrinterDriver pc = new TextFilePrinterDriver(fout, 15, 10);

      final PageableTextOutputProcessor outputProcessor = new PageableTextOutputProcessor(pc,
          report.getConfiguration());
      final PageableReportProcessor proc = new PageableReportProcessor(report, outputProcessor);
      proc.processReport();
      proc.close();
      fout.close();
      return true;
    }
    catch (Exception e)
    {
      logger.error("Writing PlainText failed.", e);
View Full Code Here

  public static boolean createPDF(final MasterReport report, final String fileName)
  {
    OutputStream out = null;
    try
    {
      out = new BufferedOutputStream(new FileOutputStream(new File(fileName)));
      final PdfOutputProcessor outputProcessor = new PdfOutputProcessor(report.getConfiguration(), out,
          report.getResourceManager());
      final PageableReportProcessor proc = new PageableReportProcessor(report, outputProcessor);
      proc.processReport();
      proc.close();
View Full Code Here

   * @throws Exception if an error occurs.
   */
  public static void createPlainText(final MasterReport report, final String filename)
      throws Exception
  {
    final OutputStream fout = new BufferedOutputStream(new FileOutputStream(filename));
    // cpi = 15, lpi = 10
    final TextFilePrinterDriver pc = new TextFilePrinterDriver(fout, 15, 10);

    final PageableTextOutputProcessor outputProcessor = new PageableTextOutputProcessor(pc, report.getConfiguration());
    final PageableReportProcessor proc = new PageableReportProcessor(report, outputProcessor);
    proc.processReport();
    proc.close();
    fout.close();
  }
View Full Code Here

   */
  public static void createCSV(final MasterReport report, final String filename)
      throws Exception
  {

    final OutputStream outputStream = new BufferedOutputStream(new FileOutputStream(filename));
    final StreamCSVOutputProcessor target = new StreamCSVOutputProcessor(report.getConfiguration(), outputStream);

    final StreamReportProcessor reportProcessor = new StreamReportProcessor(report, target);
    reportProcessor.processReport();
    outputStream.close();
  }
View Full Code Here

TOP

Related Classes of java.io.BufferedOutputStream

Copyright © 2015 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.