Examples of writeTo()


Examples of org.ajax4jsf.io.FastBufferOutputStream.writeTo()

        if (null != out) {
          if(!(out instanceof FastBufferOutputStream)) {
            FastBufferOutputStream bout = new FastBufferOutputStream();
          pprint(((DOMNodeImpl) node).adaptee, OutFactory.getOut(
              this.configuration, bout));
          bout.writeTo(out);
          } else {
          pprint(((DOMNodeImpl) node).adaptee, OutFactory.getOut(
              this.configuration, out));
          }
    }
View Full Code Here

Examples of org.ajax4jsf.io.FastBufferReader.writeTo()

//      haveHtml = true;
//    }
    // Send rest of input.
    if (in instanceof FastBufferReader) {
      FastBufferReader fastIn = (FastBufferReader) in;
      fastIn.writeTo(out);

    } else {
      char[] buffer = new char[1024];
      int buffersCount = -1;
      int length;
View Full Code Here

Examples of org.ajax4jsf.io.FastBufferWriter.writeTo()

        if (null != out) {
          if(!(out instanceof FastBufferWriter)) {
            FastBufferWriter bout = new FastBufferWriter();
          pprint(((DOMDocumentImpl) doc).adaptee, OutFactory.getOut(
              this.configuration, bout));
          bout.writeTo(out);
          } else {
          pprint(((DOMDocumentImpl) doc).adaptee, OutFactory.getOut(
              this.configuration, out));
          }
    }
View Full Code Here

Examples of org.apache.abdera.ext.opensearch.model.OpenSearchDescription.writeTo()

       
        document.addUrls(url);
        document.addQueries(query);
       
        StringWriter writer = new StringWriter();
        document.writeTo(writer);
       
        String result = writer.toString();
       
        System.out.print(result);
       
View Full Code Here

Examples of org.apache.abdera.model.Base.writeTo()

            {
                public void write(MuleEvent event, OutputStream out) throws IOException
                {
                    FOMWriterOptions opts = new FOMWriterOptions();
                    opts.setCharset(event.getEncoding());
                    e.writeTo(out, opts);
                }
            };
        }
        catch (Exception e)
        {
View Full Code Here

Examples of org.apache.abdera.model.Document.writeTo()

        assertEquals(ResponseType.SUCCESS, resp.getType());
        assertTrue(MimeTypeHelper.isMatch(resp.getContentType().toString(), OpenSearchConstants.OPENSEARCH_DESCRIPTION_CONTENT_TYPE));

        Document doc = resp.getDocument();
        StringWriter writer = new StringWriter();
        doc.writeTo(writer);

        String result = writer.toString();
        System.out.println(result);

        assertXpathEvaluatesTo(SHORT_NAME, "/os:OpenSearchDescription/os:ShortName", result);
View Full Code Here

Examples of org.apache.abdera.model.Element.writeTo()

        String html = "<html><body><p>this is <i>html</i></body></html>";
        Abdera abdera = Abdera.getInstance();
        Parser parser = abdera.getParserFactory().getParser("html");
        Document<Element> doc = parser.parse(new StringReader(html));
        Element root = doc.getRoot();
        root.writeTo(System.out);
        System.out.println();

        XPath xpath = abdera.getXPath();
        List<Element> list = xpath.selectNodes("//i", doc.getRoot());
        for (Element element : list)
View Full Code Here

Examples of org.apache.abdera.model.Entry.writeTo()

    assertEquals(certs.length, 1);
    assertEquals(certs[0].getSubjectDN().getName(), "CN=James M Snell, OU=WebAhead, O=IBM, L=Hanford, ST=California, C=US");
   
    // Check the round trip
    ByteArrayOutputStream out = new ByteArrayOutputStream();
    entry.writeTo(out); // do not use the pretty writer, it will break the signature
    ByteArrayInputStream bais = new ByteArrayInputStream(out.toByteArray());
    Document<Entry> entry_doc = abdera.getParser().parse(bais);
    entry = entry_doc.getRoot();
    assertTrue(sig.verify(entry, null))// the signature better still be valid
   
View Full Code Here

Examples of org.apache.abdera.model.Feed.writeTo()

            ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
            Thread.currentThread().setContextClassLoader(
                getClass().getClassLoader());
            try {
                feed.writeTo(response.getOutputStream());
            } finally {
                Thread.currentThread().setContextClassLoader(classLoader);
            }
        } catch (IOException e) {
            throw new JspException("Unable to write feed", e);
View Full Code Here

Examples of org.apache.abdera.model.Service.writeTo()

        coll.setAcceptsEntry();
        assertTrue("Collection does not accept entries.", coll.acceptsEntry());
        coll.addAccepts("application/apples");
        assertTrue("Collection does not accept apples.", coll.accepts("application/apples"));
        StringWriter sw = new StringWriter();
        svc.writeTo(sw);
        // System.out.println(sw);
        String s = sw.toString();
        assertTrue("Service document does not specify acceptance of entries.", s.contains("application/atom+xml; type=entry"));
        assertTrue("Service document does not specify acceptance of apples.", s.contains("application/apples"));
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.