Package com.sun.syndication.io

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


    syndFeed.setFeedType(getFeedType().getFeedType());

    SyndFeedOutput output = new SyndFeedOutput();

    try {
      output.output(syndFeed, response.getWriter());
    } catch (IOException e) {
      throw new ServletException("Error generating feed", e);
    } catch (FeedException e) {
      throw new ServletException("Error generating feed", e);
    }
View Full Code Here


       
        feed.setEntries(entries);
       
        // output the feed to the output stream
        SyndFeedOutput output = new SyndFeedOutput();
        output.output(feed, writer);
    }
   
    @SuppressWarnings("unchecked")   
    private SyndEntry createFeedItem(Object annotatedObject) throws Exception {
        SyndEntry syndEntry     = new SyndEntryImpl();
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(dbFeed.getType());
 
        res.setContentType(MIME_TYPE);
        SyndFeedOutput output = new SyndFeedOutput();
        output.output(feed, res.getWriter());
      }
      else
        throw( new FeedException("No dir Id given!"));
    }
    catch (FeedException ex)
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

    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

    }

    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

        // we write RSS for both media types
        feed.setFeedType(RSS_2_0);
      }
      final Writer w = new OutputStreamWriter(entityStream);
      final SyndFeedOutput output = new SyndFeedOutput();
      output.output(feed, w);
    }
    catch (FeedException e) {
      log.error("Problem during write", e);
      throw new IOException(e);
    }
View Full Code Here

            File outputFile = new File(outputDirectory,
                                       String.format("mpo.%s.xml",
                                                     classifier));
            writer = new FileWriter(outputFile);
            SyndFeedOutput output = new SyndFeedOutput();
            output.output(feed,writer);
            writer.close();
        }
        catch (IOException e)
        {
            Logger.error(String.format("A problem occurred when generating the %s feed",
View Full Code Here

    //write the RSS feed used in the test into a ByteArrayOutputStream
    ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
    Writer writer = new OutputStreamWriter(outputStream);
    SyndFeedOutput output = new SyndFeedOutput();
        
    output.output(RSSProducerResource.getFeed(), writer);
    //the response and the written RSS must be equal
    Assert.assertEquals(responseTxt, outputStream.toString());
  }
}
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.