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

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


    assertEquals(utf8, utf16);
  }

  private String writeReport(final MasterReport report) throws IOException, ReportWriterException
  {
    final MemoryStringWriter oWriter = new MemoryStringWriter();
    final ReportWriter rc = new ReportWriter
        (report, "UTF-16", ReportWriter.createDefaultConfiguration(report));

    rc.addClassFactoryFactory(new URLClassFactory());
    rc.addClassFactoryFactory(new DefaultClassFactory());
    rc.addClassFactoryFactory(new BandLayoutClassFactory());
    rc.addClassFactoryFactory(new ArrayClassFactory());

    rc.addStyleKeyFactory(new DefaultStyleKeyFactory());
    rc.addStyleKeyFactory(new PageableLayoutStyleKeyFactory());
    rc.addTemplateCollection(new DefaultTemplateCollection());
    rc.addElementFactory(new DefaultElementFactory());
    rc.addDataSourceFactory(new DefaultDataSourceFactory());

    rc.write(oWriter);
    oWriter.close();
    return oWriter.toString();

  }
View Full Code Here


  private String readFromException(final Exception e)
  {
    String text = messages.getString("ExceptionDialog.USER_NO_BACKTRACE");//$NON-NLS-1$
    try
    {
      final MemoryStringWriter writer = new MemoryStringWriter();
      final PrintWriter pwriter = new PrintWriter(writer);
      e.printStackTrace(pwriter);
      text = writer.toString();
      pwriter.close();
    }
    catch (Exception ex)
    {
      ExceptionDialog.logger.info(messages.getString("ExceptionDialog.INFO_EXCEPTION_SUPRESSED")); //$NON-NLS-1$
View Full Code Here

              this.xmlWriter.setHtmlCompatiblityMode(true);
              writeCompleteHeader(xmlWriter, writer, contentProducer, logicalPage, styleFileUrl, null);
            }
            else
            {
              this.bufferWriter = new MemoryStringWriter(1024 * 512);
              this.xmlWriter = new XmlWriter(bufferWriter, td);
              this.xmlWriter.setAdditionalIndent(1);
              this.xmlWriter.addImpliedNamespace(HtmlPrinter.XHTML_NAMESPACE, "");
              this.xmlWriter.setHtmlCompatiblityMode(true);
            }
View Full Code Here

TOP

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

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.