Package org.pentaho.reporting.engine.classic.core.util

Examples of org.pentaho.reporting.engine.classic.core.util.NoCloseOutputStream


      document = new Document(pageSize, marginLeft, marginRight, marginTop, marginBottom);
      imageCache = new RTFImageCache(resourceManager);

      // rtf does not support PageFormats or other meta data...
      final RtfWriter2 instance = RtfWriter2.getInstance(document, new NoCloseOutputStream(outputStream));
      instance.getDocumentSettings().setAlwaysUseUnicode(true);

      final String author = config.getConfigProperty
          ("org.pentaho.reporting.engine.classic.core.modules.output.table.rtf.Author");
      if (author != null)
View Full Code Here


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

    final StreamRepository streamRepository = new StreamRepository(new NoCloseOutputStream(outputStream));
    final ContentLocation targetRoot = streamRepository.getRoot();

    task.setBodyContentLocation(targetRoot);
    task.setBodyNameGenerator(new DefaultNameGenerator(targetRoot, fileName, suffix));
  }
View Full Code Here

  public void testHTMLExport() throws ReportProcessingException, ResourceException
  {
    MasterReport report = DebugReportRunner.parseGoldenSampleReport("Prd-3529.prpt");
    // produce HTML output ..
    HtmlReportUtil.createStreamHTML(report, new NoCloseOutputStream(System.out));
  }
View Full Code Here

    final ResourceManager resourceManager = new ResourceManager();
    resourceManager.registerDefaults();
    final Resource directly = resourceManager.createDirectly(url, MasterReport.class);
    final MasterReport report = (MasterReport) directly.getResource();
    final MemoryByteArrayOutputStream mbos = new MemoryByteArrayOutputStream();
    XmlTableReportUtil.createFlowXML(report, new NoCloseOutputStream(mbos));

    final ByteArrayInputStream bin = new ByteArrayInputStream(mbos.getRaw(), 0, mbos.getLength());
    final DocumentBuilder documentBuilder = DocumentBuilderFactory.newInstance().newDocumentBuilder();
    final Document document = documentBuilder.parse(bin);
    final NodeList table = document.getDocumentElement().getElementsByTagName("table");
View Full Code Here

    final ResourceManager resourceManager = new ResourceManager();
    resourceManager.registerDefaults();
    final Resource directly = resourceManager.createDirectly(url, MasterReport.class);
    final MasterReport report = (MasterReport) directly.getResource();
    final MemoryByteArrayOutputStream mbos = new MemoryByteArrayOutputStream();
    ExcelReportUtil.createXLS(report, new NoCloseOutputStream(mbos));

    final ByteArrayInputStream bin = new ByteArrayInputStream(mbos.getRaw(), 0, mbos.getLength());
    final Workbook workbook = WorkbookFactory.create(bin);
    assertEquals(4, workbook.getNumberOfSheets());
    assertEquals("Summary", workbook.getSheetAt(0).getSheetName());
View Full Code Here

      document = new Document(pageSize, marginLeft, marginRight, marginTop, marginBottom);
      imageCache = new RTFImageCache(resourceManager);

      // rtf does not support PageFormats or other meta data...
      final PatchRtfWriter2 instance = PatchRtfWriter2.getInstance(document, new NoCloseOutputStream(outputStream));
      instance.getDocumentSettings().setAlwaysUseUnicode(true);

      final String author = config.getConfigProperty
          ("org.pentaho.reporting.engine.classic.core.modules.output.table.rtf.Author");
      if (author != null)
View Full Code Here

  public void write (final OutputStream outputStream,
                     final ElementStyleDefinition styleDefinition) throws IOException
  {
    final DefaultTagDescription tagDescription = BundleWriterHandlerRegistry.getInstance().createWriterTagDescription();
    final XmlWriter writer = new XmlWriter(new OutputStreamWriter(new NoCloseOutputStream(outputStream), "UTF-8"), tagDescription, "  ", "\n");
    writer.writeXmlDeclaration("UTF-8");

    final AttributeList rootAttributes = new AttributeList();
    rootAttributes.addNamespaceDeclaration("", BundleNamespaces.STYLE);
    rootAttributes.addNamespaceDeclaration("layout", BundleNamespaces.LAYOUT);
View Full Code Here

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

    final StreamRepository streamRepository = new StreamRepository(new NoCloseOutputStream(outputStream));
    final ContentLocation targetRoot = streamRepository.getRoot();

    task.setBodyContentLocation(targetRoot);
    task.setBodyNameGenerator(new DefaultNameGenerator(targetRoot, fileName, suffix));
  }
View Full Code Here

TOP

Related Classes of org.pentaho.reporting.engine.classic.core.util.NoCloseOutputStream

Copyright © 2018 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.