Package com.sun.syndication.io

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


        return new StreamingOutput() {
            public void write(OutputStream output) throws IOException, WebApplicationException {
                Writer writer = new OutputStreamWriter(output);
                try {
                    syndFeedOutput.output(feed, writer, true);
                } catch (FeedException e) { // TODO: log me
                    throw new WebApplicationException(Status.INTERNAL_SERVER_ERROR);
                }
            }
        };
View Full Code Here


            SyndFeedOutput output = new SyndFeedOutput();
            // we'll need the writer since Rome doesn't support writing to an outputStream yet
            Writer out = null;
            try {
                out = ServletActionContext.getResponse().getWriter();
                output.output(feed, out);
            } catch (Exception e) {
                // Woops, couldn't write the feed ?
                logger.error("Could not write the feed: " + e.getMessage(), e);
            } finally {
                // close the output writer (will flush automatically)
View Full Code Here

     */
    public void output(java.io.Writer writer)
        throws FeedException, IOException
    {
        SyndFeedOutput feedWriter = new SyndFeedOutput();
        feedWriter.output(feed, writer);
    }

    /**
     * Add a ROME plugin module (e.g. for OpenSearch) at the feed level.
     */
 
View Full Code Here

    feed.setFeedType(feedTypes.get(feedType));
    createFeed(feed, model);
    response.setContentType(contentTypes.get(feedType));
    response.setCharacterEncoding("UTF-8");
    SyndFeedOutput output = new SyndFeedOutput();
    output.output(feed, response.getWriter());
  }

  protected abstract void createFeed(SyndFeed feed, Map model);

  public Integer getMaximalCount() {
View Full Code Here

   
    PrintWriter writer = new PrintWriter(response.getOutputStream());
    SyndFeedOutput output = new SyndFeedOutput();
    try
    {
      output.output(getFeed(), writer);
    }
    catch (IOException e)
    {
      throw new RuntimeException("Error streaming feed.", e);
    }
View Full Code Here

       */
      entries.add(entry);
    }
    feed.setEntries(entries);
    SyndFeedOutput out = new SyndFeedOutput();
    out.output(feed, new OutputStreamWriter(output));
  }

  public class SequenceWalker extends DirectoryWalker {
    List<File> results;

View Full Code Here

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

            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

        SyndFeedOutput output = new SyndFeedOutput();
        StringWriter writer = new StringWriter();

        try
        {
            output.output(feed, writer);
        }
        catch (IOException e)
        {
            log.error("error in writing feed");
        }
View Full Code Here

      SyndFeedOutput output = new SyndFeedOutput();

      Writer out = null;
      try {
        out = ServletActionContext.getResponse().getWriter();
        output.output(feed, out);
      } catch(Exception ex) {
        ex.printStackTrace();
      } finally {
        // close the output writer (will flush automatically)
        if (out != null)
View Full Code Here

      // Write the feed back to the response

      SyndFeedOutput output = new SyndFeedOutput();
      Writer responseWriter = new OutputStreamWriter(response.getOutputStream(), characterEncoding);
      output.output(feed, responseWriter);
      response.getOutputStream().flush();
      return true;

    } catch (ContentRepositoryException e) {
      logger.error("Error loading articles for feeds from {}: {}", site.getIdentifier(), e.getMessage());
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.