output.output( data.feed, writer ); writer.close();
/** * send the output to designated Writer * * @param writer Writer * @throws FeedException if feed error * @throws IOException if IO error */ public void output(java.io.Writer writer) throws FeedException, IOException { SyndFeedOutput feedWriter = new SyndFeedOutput(); feedWriter.output(feed, writer); }
public void write(OutputStream outputStream) throws IOException { try { Writer w = new OutputStreamWriter(outputStream); SyndFeedOutput output = new SyndFeedOutput(); output.output(feed, w); } catch (FeedException e) { throw new RuntimeException("Got exception while generating feed!", e); } } }
private void doWrite(SyndFeed feed) throws IOException, FeedException { feed.setFeedType(feedType.value); SyndFeedOutput output = new SyndFeedOutput(); output.output(feed, response.getWriter()); response.getWriter().close(); } }
/** * @see FeedPluginApi#getFeedOutput(SyndFeed, String) */ public String getFeedOutput(SyndFeed feed, String type, XWikiContext context) { feed.setFeedType(type); StringWriter writer = new StringWriter(); SyndFeedOutput output = new SyndFeedOutput(); try { output.output(feed, writer); writer.close(); return writer.toString(); } catch (Exception e) { e.printStackTrace(); return ""; } }
/** * {@inheritDoc} */ public String getFeedOutput(SyndFeed feed, String type) { feed.setFeedType(type); StringWriter writer = new StringWriter(); SyndFeedOutput output = new SyndFeedOutput(); try { output.output(feed, writer); writer.close(); return writer.toString(); } catch (Exception e) { return ""; } }
@Override public void write(Writer writer) throws IOException { try { SyndFeedOutput output = new SyndFeedOutput(); if (this.feed.getFeedType() == null) { this.feed.setFeedType("atom_1.0"); } output.output(this.feed, writer); } catch (FeedException e) { IOException ioe = new IOException("Feed exception"); ioe.initCause(e); throw ioe; } } }
public static void writeFeed(SyndFeed feed, FeedType feedType, Writer outputWriter) throws FeedException, IOException { try { feed.setFeedType(feedType.getType()); SyndFeedOutput output = new SyndFeedOutput(); output.output(feed, outputWriter); } catch (FeedException ex) { ex.printStackTrace(); } }
output.output(feed, new PrintWriter(System.out));
output.output(feed, new PrintWriter(System.out));
output.output( feed, res.getWriter() );
output.output( feed, res.getWriter() );
response.setContentType(MIME_TYPE); SyndFeedOutput output = new SyndFeedOutput(); output.output(feed, response.getWriter());
output.output(feed, writer);