Package com.sun.syndication.io

Examples of com.sun.syndication.io.SyndFeedOutput.output()


        ByteArrayOutputStream bos = new ByteArrayOutputStream();
       
        syndFeed.setFeedType("atom_1.0");
        SyndFeedOutput syndOutput = new SyndFeedOutput();
        try {
            syndOutput.output(syndFeed, new OutputStreamWriter(bos));
        } catch (Exception e) {
            throw new RuntimeException(e);
        }
        Parser parser = Abdera.getNewParser();
        Document<Feed> document = parser.parse(new ByteArrayInputStream(bos.toByteArray()));
View Full Code Here


                    SyndFeed syndFeed = new SyndFeedImpl(feed);
                    syndFeed.setFeedType(requestFeedType);
                    syndFeed.setLink(path);
                    SyndFeedOutput syndOutput = new SyndFeedOutput();
                    try {
                        syndOutput.output(syndFeed, getWriter(response));
                    } catch (FeedException e) {
                        throw new ServletException(e);
                    }
                } else {
                    response.sendError(HttpServletResponse.SC_NOT_FOUND);
View Full Code Here

    protected void printFooter(PrintWriter writer, QueueBrowser browser, HttpServletRequest request) throws IOException, JMSException, ServletException {
        // now lets actually write out the content
        SyndFeed feed = getFeed(browser, request);
        SyndFeedOutput output = new SyndFeedOutput();
        try {
            output.output(feed, writer);
        } catch (FeedException e) {
            throw new ServletException(e);
        }
    }
View Full Code Here

                    feed.setFeedType("atom_1.0");
                    SyndFeed syndFeed = new SyndFeedImpl(feed);
                    syndFeed.setFeedType(requestFeedType);
                    SyndFeedOutput syndOutput = new SyndFeedOutput();
                    try {
                        syndOutput.output(syndFeed, getWriter(response));
                    } catch (FeedException e) {
                        throw new ServletException(e);
                    }
                } else {
                    response.sendError(HttpServletResponse.SC_NOT_FOUND);
View Full Code Here

                    feed.setFeedType("atom_1.0");
                    SyndFeed syndFeed = new SyndFeedImpl(feed);
                    syndFeed.setFeedType(requestFeedType);
                    SyndFeedOutput syndOutput = new SyndFeedOutput();
                    try {
                        syndOutput.output(syndFeed, getWriter(response));
                    } catch (FeedException e) {
                        throw new ServletException(e);
                    }
                } else {
                    response.sendError(HttpServletResponse.SC_NOT_FOUND);
View Full Code Here

    }
    feed.setEntries(entries);

    OutputStreamWriter writer = new OutputStreamWriter(os, "UTF-8");
    SyndFeedOutput output = new SyndFeedOutput();
    output.output(feed, writer);
    writer.close();
  }

  /**
   * Reads a Gitblit RSS feed.
View Full Code Here

            {
                feed.setLink( req.getRequestURL().toString() );
            }

            SyndFeedOutput output = new SyndFeedOutput();
            output.output( feed, res.getWriter() );
        }
        catch ( UserNotFoundException unfe )
        {
            log.debug( COULD_NOT_AUTHENTICATE_USER, unfe );
            res.sendError( HttpServletResponse.SC_UNAUTHORIZED, COULD_NOT_AUTHENTICATE_USER );
View Full Code Here

            {
                feed.setLink( req.getRequestURL() + "?groupId=" + groupId + "&artifactId=" + artifactId );
            }

            SyndFeedOutput output = new SyndFeedOutput();
            output.output( feed, res.getWriter() );
        }
        catch ( ArchivaDatabaseException e )
        {
            log.debug( COULD_NOT_GENERATE_FEED_ERROR, e );
            res.sendError( HttpServletResponse.SC_INTERNAL_SERVER_ERROR, COULD_NOT_GENERATE_FEED_ERROR );
View Full Code Here

          entries.add(entry);
         
          feed.setEntries(entries);
         
          SyndFeedOutput output = new SyndFeedOutput();       
          output.output(feed, new OutputStreamWriter(out));
        } else {
            sendFeedData(response, lastModifiedDate, responseETag, gzip);
        }
    }   
   
View Full Code Here

    }
    feed.setEntries(entries);

    OutputStreamWriter writer = new OutputStreamWriter(os, "UTF-8");
    SyndFeedOutput output = new SyndFeedOutput();
    output.output(feed, writer);
    writer.close();
  }

  /**
   * Reads a Gitblit RSS feed.
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.