Package com.sun.syndication.io

Examples of com.sun.syndication.io.WireFeedOutput


        }

        // get the service event handler
        this.service = new ServiceEventHandler();
        this.service.init(context);
        this.out = new WireFeedOutput();
    }
View Full Code Here


    private SyndFeed feed;
    private WireFeedOutput output;

    protected void setUp() throws Exception {
        this.feed = createFeed();
        this.output = new WireFeedOutput();


    }
View Full Code Here

      if (((Channel) feed).getTitle() == null) {
        throw new IllegalArgumentException("feed title must be set");
      }
    }

    final Document doc = new WireFeedOutput().outputJDom(feed);

    final Format format = debug ? Format.getPrettyFormat() : Format.getRawFormat();
    format.setOmitDeclaration(true);
    format.setOmitEncoding(true);
View Full Code Here

                if (feed != null) {
                   
                    // Write the Atom feed
                    response.setContentType("application/atom+xml; charset=utf-8");
                    feed.setFeedType(requestFeedType);
                    WireFeedOutput feedOutput = new WireFeedOutput();
                    try {
                        feedOutput.output(feed, getWriter(response));
                    } catch (FeedException e) {
                        throw new ServletException(e);
                    }
                } else {
                    response.sendError(HttpServletResponse.SC_NOT_FOUND);
View Full Code Here

                if (feed != null) {
                   
                    // Write the Atom feed
                    response.setContentType("application/atom+xml; charset=utf-8");
                    feed.setFeedType(requestFeedType);
                    WireFeedOutput feedOutput = new WireFeedOutput();
                    try {
                        feedOutput.output(feed, getWriter(response));
                    } catch (FeedException e) {
                        throw new ServletException(e);
                    }
                } else {
                    response.sendError(HttpServletResponse.SC_NOT_FOUND);
View Full Code Here

        Document document = builder.build(reader);
        Element root = document.getRootElement();
        root.detach();
        Feed feed = new Feed();
        feed.setFeedType(feedType);
        WireFeedOutput wireFeedOutput = new WireFeedOutput();
        document = wireFeedOutput.outputJDom(feed);
        document.getRootElement().addContent(root);
        WireFeedInput input = new WireFeedInput();
        feed = (Feed)input.build(document);
        Entry entry = (Entry)feed.getEntries().get(0);
        if (entry.getContents().size() != 0) {
View Full Code Here

        feed.setFeedType(feedType);
        List<Entry> entries = new ArrayList<Entry>();
        entries.add(entry);
        feed.setEntries(entries);

        WireFeedOutput wireFeedOutput = new WireFeedOutput();
        Document document = wireFeedOutput.outputJDom(feed);
        Element root = document.getRootElement();
        Element element = (Element)root.getChildren().get(0);
        XMLOutputter outputter = new XMLOutputter();
        outputter.setFormat(Format.getPrettyFormat());
        outputter.output(element, writer);
View Full Code Here

                if (feed != null) {

                    // Write the Atom feed
                    response.setContentType("application/atom+xml; charset=utf-8");
                    feed.setFeedType(requestFeedType);
                    WireFeedOutput feedOutput = new WireFeedOutput();
                    try {
                        feedOutput.output(feed, getWriter(response));
                    } catch (FeedException e) {
                        throw new ServletException(e);
                    }
                } else {
                    response.sendError(HttpServletResponse.SC_NOT_FOUND);
View Full Code Here

        Document document = builder.build(reader);
        Element root = document.getRootElement();
        root.detach();
        Feed feed = new Feed();
        feed.setFeedType(feedType);
        WireFeedOutput wireFeedOutput = new WireFeedOutput();
        document = wireFeedOutput.outputJDom(feed);
        document.getRootElement().addContent(root);
        WireFeedInput input = new WireFeedInput();
        feed = (Feed)input.build(document);
        Entry entry = (Entry)feed.getEntries().get(0);
        return entry;
View Full Code Here

        feed.setFeedType(feedType);
        List<Entry> entries = new ArrayList<Entry>();
        entries.add(entry);
        feed.setEntries(entries);

        WireFeedOutput wireFeedOutput = new WireFeedOutput();
        Document document = wireFeedOutput.outputJDom(feed);
        Element root = document.getRootElement();
        Element element = (Element)root.getChildren().get(0);
        XMLOutputter outputter = new XMLOutputter();
        outputter.setFormat(Format.getPrettyFormat());
        outputter.output(element, writer);
View Full Code Here

TOP

Related Classes of com.sun.syndication.io.WireFeedOutput

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.