Package org.apache.abdera.writer

Examples of org.apache.abdera.writer.Writer


    res = client.get(colUri.resolve(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


    res.release();
  }

  protected 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

    server.stop();
  }

  protected void prettyPrint(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

    public void writeTo(Entry entry, MediaType mt,
                        MultivaluedMap<String, Object> headers, OutputStream os)
        throws IOException {
        if (JSON_TYPE.equals(mt.toString())) {
            Writer w = ATOM_ENGINE.getWriterFactory().getWriter("json");
            entry.writeTo(w, os);  
        } else {
            entry.writeTo(os);
        }
    }
View Full Code Here

    public void writeTo(Feed feed, MediaType mt,
                        MultivaluedMap<String, Object> headers, OutputStream os)
        throws IOException {
        if (JSON_TYPE.equals(mt.toString())) {
            Writer w = ATOM_ENGINE.getWriterFactory().getWriter("json");
            feed.writeTo(w, os);  
        } else {
            feed.writeTo(os);
        }
    }
View Full Code Here

    server.stop();
  }

  protected void prettyPrint(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

    server.stop();
  }

  protected void prettyPrint(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

    }

    /** Pretty print the document body. */
    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

    public void writeTo(T element, Class<?> clazz, Type type, Annotation[] a,
                        MediaType mt, MultivaluedMap<String, Object> headers, OutputStream os)
        throws IOException {
        if (MediaType.APPLICATION_JSON_TYPE.isCompatible(mt)) {
            Writer w = ATOM_ENGINE.getWriterFactory().getWriter("json");
            element.writeTo(w, os);  
        } else if (formattedOutput) {
            Writer w = ATOM_ENGINE.getWriterFactory().getWriter("prettyxml");
            element.writeTo(w, os);
        } else {
            element.writeTo(os);
        }
    }
View Full Code Here

        }
    }
   
    private void writeAtomElement(Element atomElement, OutputStream os) throws IOException {
        if (formattedOutput) {
            Writer w = ATOM_ENGINE.getWriterFactory().getWriter("prettyxml");
            atomElement.writeTo(w, os);
        } else {
            atomElement.writeTo(os);
        }
    }
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.