Package org.apache.abdera.writer

Examples of org.apache.abdera.writer.Writer


 
  public void writeTo(
    java.io.Writer out,
    WriterOptions options)
      throws IOException {
    Writer writer = this.getFactory().getAbdera().getWriter();
    writer.writeTo(this,out,options);
  }
View Full Code Here


  }
 
  public void writeTo(OutputStream out) throws IOException {
    String charset = getCharset();
    if (charset == null) charset = "UTF-8";
    Writer writer = getFactory().getAbdera().getWriter();
    writeTo(writer,new OutputStreamWriter(out, charset));
  }
View Full Code Here

    Writer writer = getFactory().getAbdera().getWriter();
    writeTo(writer,new OutputStreamWriter(out, charset));
  }

  public void writeTo(java.io.Writer writer) throws IOException {
    Writer out = getFactory().getAbdera().getWriter();
    if (!(out instanceof FOMWriter)) {
      out.writeTo(this,writer);
    } else {
      try {     
        OMOutputFormat outputFormat = new OMOutputFormat();
        if (this.getCharsetEncoding() != null)
          outputFormat.setCharSetEncoding(this.getCharsetEncoding());
View Full Code Here

        entry = entry_doc.getRoot();
    }

    protected void prettyPrint(Abdera abdera, Base doc) throws IOException
    {
        Writer writer = abdera.getWriterFactory().getWriter("prettyxml");
        writer.writeTo(doc, System.out);
        System.out.println();
    }
View Full Code Here

*/
public class AtomTestCaseUtils {

    public static void prettyPrint(Abdera abdera, Base doc) throws IOException {
        WriterFactory factory = abdera.getWriterFactory();
        Writer writer = factory.getWriter("prettyxml");
        writer.writeTo(doc, System.out);
        System.out.println();
    }
View Full Code Here

    res = client.get(location.toString() + "Invalid");
    assertEquals(404, res.getStatus());
  }

  protected void prettyPrint(Abdera abdera, Base doc) throws IOException {
    Writer writer = abdera.getWriterFactory().getWriter("prettyxml");
    writer.writeTo(doc, System.out);
    System.out.println();
  }
View Full Code Here

  public void testJson() throws IOException {
    Abdera abdera = Abdera.getInstance();
    Feed f = abdera.newFeed();
    IntegerElement ext = f.addExtension(OpenSearchConstants.START_INDEX);
    ext.setValue(101);
    Writer json = abdera.getWriterFactory().getWriter("json");
   
    StringWriter stWriter = new StringWriter();
    PrintWriter pWriter = new PrintWriter(stWriter);
    f.writeTo(json, pWriter);
    assertTrue(stWriter.toString().contains("101"));
View Full Code Here

  public void writeTo(
    OutputStream out,
    WriterOptions options)
      throws IOException {
    Writer writer = this.getFactory().getAbdera().getWriter();
    writer.writeTo(this,out,options);
  }
View Full Code Here

 
  public void writeTo(
    java.io.Writer out,
    WriterOptions options)
      throws IOException {
    Writer writer = this.getFactory().getAbdera().getWriter();
    writer.writeTo(this,out,options);
  }
View Full Code Here

  }
 
  public void writeTo(OutputStream out) throws IOException {
    Document doc = getDocument();
    String charset = doc != null ? doc.getCharset() : "UTF-8";
    Writer writer = this.getFactory().getAbdera().getWriter();
    writeTo(writer,new OutputStreamWriter(out,charset));
  }
View Full Code Here

TOP

Related Classes of org.apache.abdera.writer.Writer

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.