Package java.io

Examples of java.io.OutputStreamWriter


            list.toArray(procDef);
            traceOperation("start: " + StringUtils.arrayCombine(procDef, ' '));
            process = Runtime.getRuntime().exec(procDef);
            copyInThread(process.getErrorStream(), System.err);
            reader = new BufferedReader(new InputStreamReader(process.getInputStream()));
            writer = new BufferedWriter(new OutputStreamWriter(process.getOutputStream()));
            String line = reader.readLine();
            if (line == null) {
                throw new RuntimeException("No reply from process, command: " + StringUtils.arrayCombine(procDef, ' '));
            } else if (line.startsWith("running")) {
                traceOperation("got reply: " + line);
View Full Code Here


    }

    @Override
    public void store(OutputStream outputStream) {
        store(xml);
        xmlTransformer.transform(xml, new OutputStreamWriter(outputStream));
    }
View Full Code Here

    private void writeSchemas(File destdir) throws JiBXException, IOException {
        for (Iterator iter = m_validationContext.iterateSchemas(); iter.hasNext();) {
            SchemaElement schema = (SchemaElement)iter.next();
            File file = new File(destdir, schema.getResolver().getName());
            OutputStream stream = new FileOutputStream(file);
            Writer writer = new OutputStreamWriter(stream, "utf-8");
            IBindingFactory factory = BindingDirectory.getFactory(SchemaUtils.XS_PREFIX_BINDING, SchemaElement.class);
            IMarshallingContext ictx = factory.createMarshallingContext();
            ictx.setOutput(writer);
            ictx.setIndent(2);
            ictx.marshalDocument(schema);
            writer.close();
        }
    }
View Full Code Here

   */
  public void save(final OutputStream out, final String encoding)
      throws IOException
  {
    // This print-writer will be flushed, but not closed, as closing the underlying stream is not desired here.
    final PrintWriter writer = new PrintWriter(new OutputStreamWriter(out, encoding));
    final AttributeList attList = new AttributeList();
    attList.addNamespaceDeclaration("", ConfigEditorBoot.NAMESPACE); //$NON-NLS-1$

    final DefaultTagDescription tagDescription = new DefaultTagDescription();
    tagDescription.configure
View Full Code Here

    ColorValueConverter colorValueConverter = new ColorValueConverter();
    CellBackgroundProducer cellBackgroundProducer = new CellBackgroundProducer(true, true);
    try
    {
      final XmlWriter writer = new XmlWriter(new OutputStreamWriter(System.out));
      writer.writeComment("Table Layout: ");
      writer.writeComment("Rows: " + sheetLayout.getRowCount());
      writer.writeComment("Columns: " + sheetLayout.getColumnCount());
      final int rows = sheetLayout.getRowCount();
      final int cols = sheetLayout.getColumnCount();
View Full Code Here

    static final Class nullSign[] = new Class[] { };

    static PrintWriter out;
    static void load() throws SAXException, IOException, ParserConfigurationException {
        SAXParserFactory fact = SAXParserFactory.newInstance();
        out = new PrintWriter(new OutputStreamWriter(
          new FileOutputStream("src/com/hp/hpl/jena/iri/test/test.xml"),
          "utf-8"
        ));
        out.println("<UriTests>");
       
View Full Code Here

      final ByteArrayOutputStream bo = new ByteArrayOutputStream();
      try
      {
        rc.convertReport(url, url,
            new OutputStreamWriter (bo, "UTF-16"), "UTF-16");
        final byte[] buf = bo.toByteArray();
        final String s = new String(buf, "UTF-16");
        final ByteArrayInputStream bin = new ByteArrayInputStream(buf);
        ReportGenerator.getInstance().parseReport(new InputSource(bin), url);
      }
View Full Code Here

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

        final OutputStreamWriter owriter = new OutputStreamWriter (bo, "UTF-16");
        writer.write(owriter);
        owriter.close();
      }
      catch (Exception e)
      {
        logger.debug("Failed to write " + url, e);
        fail();
View Full Code Here

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

    final OutputStreamWriter owriter = new OutputStreamWriter (System.out, "UTF-8");
    writer.write(owriter);
    owriter.close();

  }
View Full Code Here

 
    if ( url.length() == 0 || url.charAt(0) == '?' ){
     
      response.setContentType( "text/html; charset=UTF-8" );
     
      PrintWriter pw = new PrintWriter(new OutputStreamWriter( response.getOutputStream(), "UTF-8" ));

      pw.println( "<HTML><HEAD><TITLE>Vuze Feeds etc.</TITLE></HEAD><BODY>" );
     
      synchronized( providers ){
       
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.