Package com.sun.syndication.io

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


      {
        OutputStream outputStream = attributes.getResponse().getOutputStream();
        Writer writer = new OutputStreamWriter(outputStream);
        SyndFeedOutput output = new SyndFeedOutput();
            try {
          output.output(getFeed(), writer);
        } catch (FeedException e) {
          throw new WicketRuntimeException("Problems writing feed to response...");
        }
      }     
    });
View Full Code Here


        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

                response.setContentType("application/rss+xml; charset=utf-8");
                feed.setFeedType("rss_2.0");
                feed.setLink(path);
                SyndFeedOutput syndOutput = new SyndFeedOutput();
                try {
                    syndOutput.output(feed, getWriter(response));
                } catch (FeedException e) {
                    throw new ServletException(e);
                }
            } else {
                response.sendError(HttpServletResponse.SC_NOT_FOUND);
View Full Code Here

    }

    protected void writeFeed(SyndFeed feed, MessageExchange messageExchange, NormalizedMessage message) throws IOException, FeedException {
        Writer writer = new FileWriter(feedFile);
        SyndFeedOutput output = new SyndFeedOutput();
        output.output(feed, writer);
        writer.close();
    }

    /**
     * Removes any old entires no longer required in the cachedFeed
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

                response.setContentType("application/rss+xml; charset=utf-8");
                feed.setFeedType("rss_2.0");
                feed.setLink(path);
                SyndFeedOutput syndOutput = new SyndFeedOutput();
                try {
                    syndOutput.output(feed, getWriter(response));
                } catch (FeedException e) {
                    throw new ServletException(e);
                }
            } else {
                response.sendError(HttpServletResponse.SC_NOT_FOUND);
View Full Code Here

    }
    feed.setFeedType(feedType);
    resp.setContentType("application/xml; charset=utf-8");
    SyndFeedOutput output = new SyndFeedOutput();
    try {
      output.output(feed, resp.getWriter());
    } catch (FeedException ex) {
      resp.sendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR, "Could not generate feed");
    }
  }
View Full Code Here

        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

            {
                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

                    SyndFeed syndFeed = new SyndFeedImpl(feed);
                    syndFeed.setFeedType(requestFeedType);
                    SyndFeedOutput syndOutput = new SyndFeedOutput();
                    try {
                        OutputStream output = response.getOutputStream();
                        syndOutput.output(syndFeed, new PrintWriter(output));
                    } catch (FeedException e) {
                        throw new ServletException(e);
                    }
                } else {
                    response.sendError(HttpServletResponse.SC_NOT_FOUND);
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.