Package java.io

Examples of java.io.OutputStreamWriter


        "text/xml"));
    final Configuration globalConfig = ClassicEngineBoot.getInstance().getGlobalConfig();
    final DefaultTagDescription tagDescription = new DefaultTagDescription(globalConfig,
        BundleXmlModule.TAG_DEF_PREFIX);
    final XmlWriter writer = new XmlWriter
        (new OutputStreamWriter(outputStream, "UTF-8"), tagDescription, "  ", "\n");
    writer.writeXmlDeclaration("UTF-8");

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


            (contentNameGenerator.generateName(null, "text/html"));

        final OutputStream out = documentContentItem.getOutputStream();
        final String encoding = configuration.getConfigProperty
            (HtmlTableModule.ENCODING, EncodingRegistry.getPlatformDefaultEncoding());
        writer = new BufferedWriter(new OutputStreamWriter(out, encoding));

        final DefaultTagDescription td = new DefaultTagDescription();
        td.configure(getConfiguration(), "org.pentaho.reporting.engine.classic.core.modules.output.table.html.");

        if (isCreateBodyFragment() == false)
View Full Code Here

    if (styleFile != null)
    {
      final String encoding = configuration.getConfigProperty
          (HtmlTableModule.ENCODING, EncodingRegistry.getPlatformDefaultEncoding());
      final Writer styleOut = new OutputStreamWriter
          (new BufferedOutputStream(styleFile.getOutputStream()), encoding);
      styleManager.write(styleOut);
      styleOut.flush();
      styleOut.close();

      if (isForceBufferedWriting() == false)
      {
        // A complete header had been written when the processing started ..
        this.xmlWriter.writeCloseTag(); // for the body tag
View Full Code Here

    {
      throw new IOException("The specified report definition was not found");
    }
    final File out = new File(outFile);
    final OutputStream base = new FileOutputStream(out);
    final Writer w = new BufferedWriter(new OutputStreamWriter(base, encoding));
    try
    {
      convertReport(reportURL, out.toURL(), w, encoding);
    }
    finally
View Full Code Here

  public void convertReport(final File in, final File out, final String encoding)
      throws IOException, ReportWriterException
  {
    final OutputStream base = new FileOutputStream(out);
    final Writer w = new BufferedWriter
        (new OutputStreamWriter(base, encoding));
    try
    {
      convertReport(in.toURL(), out.toURL(), w, encoding);
    }
    finally
View Full Code Here

  public void testDataSourceWriter() throws Exception
  {
    final ReportWriter writer = createWriter();
    final StaticDataSource ds = new StaticDataSource(new Line2D.Float());
    final ClassFactory cc = writer.getClassFactoryCollector();
    final Writer w = new OutputStreamWriter(new NullOutputStream(), "UTF-16");
    final XmlWriter xmlWriter = new XmlWriter(w);

    final AttributeList attList = new AttributeList();
    attList.addNamespaceDeclaration("", ExtParserModule.NAMESPACE);
    xmlWriter.writeTag(ExtParserModule.NAMESPACE, "testcase", attList, XmlWriter.OPEN);
    final DataSourceWriter dsW = new DataSourceWriter(writer,
        ds, cc.getDescriptionForClass(ds.getClass()), xmlWriter);
    dsW.write();
    xmlWriter.writeCloseTag();
    w.flush();
  }
View Full Code Here

        }
      }

      final String encoding = report.getConfiguration().getConfigProperty
          (CSVProcessor.CSV_ENCODING, EncodingRegistry.getPlatformDefaultEncoding());
      out = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(file), encoding));

      final CSVProcessor target = new CSVProcessor(report);
      if (progressDialog != null)
      {
        progressDialog.setModal(false);
View Full Code Here

    }

    final OutputStream outputStream = bundle.createEntry(fileName, "text/xml");
    final DefaultTagDescription tagDescription = new DefaultTagDescription(
        ClassicEngineBoot.getInstance().getGlobalConfig(), SQLDataFactoryModule.TAG_DEF_PREFIX);
    final XmlWriter xmlWriter = new XmlWriter(new OutputStreamWriter(outputStream, "UTF-8"), tagDescription, "  ",
        "\n");
    final AttributeList rootAttrs = new AttributeList();
    rootAttrs.addNamespaceDeclaration("data", SQLDataFactoryModule.NAMESPACE);
    xmlWriter.writeTag(SQLDataFactoryModule.NAMESPACE, "sql-datasource", rootAttrs, XmlWriterSupport.OPEN);
View Full Code Here

    // prepare anything that might needed to be prepared ..
    final String encoding = metaData.getConfiguration().getConfigProperty
        ("org.pentaho.reporting.engine.classic.core.modules.output.pageable.xml.Encoding",
            EncodingRegistry.getPlatformDefaultEncoding());

    final Writer writer = new BufferedWriter(new OutputStreamWriter(outputStream, encoding));
    this.xmlWriter = new XmlWriter(writer, td);
    this.xmlWriter.writeXmlDeclaration(encoding);
    final AttributeList attrs = new AttributeList();
    attrs.addNamespaceDeclaration("", XmlDocumentWriter.LAYOUT_OUTPUT_NAMESPACE);
    xmlWriter.writeTag(XmlDocumentWriter.LAYOUT_OUTPUT_NAMESPACE, "layout-output", attrs, XmlWriter.OPEN);
View Full Code Here

    }

    final OutputStream outputStream = bundle.createEntry(fileName, "text/xml");
    final DefaultTagDescription tagDescription = new DefaultTagDescription(
        ClassicEngineBoot.getInstance().getGlobalConfig(), SQLDataFactoryModule.TAG_DEF_PREFIX);
    final XmlWriter xmlWriter = new XmlWriter(new OutputStreamWriter(outputStream, "UTF-8"), tagDescription, "  ",
        "\n");
    final AttributeList rootAttrs = new AttributeList();
    rootAttrs.addNamespaceDeclaration("data", SQLDataFactoryModule.NAMESPACE);
    xmlWriter.writeTag(SQLDataFactoryModule.NAMESPACE, "direct-sql-datasource", rootAttrs, XmlWriterSupport.OPEN);
View Full Code Here

TOP

Related Classes of java.io.OutputStreamWriter

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.