Package com.rometools.rome.io

Examples of com.rometools.rome.io.WireFeedOutput.output()


    }

    WireFeedOutput feedOutput = new WireFeedOutput();
    try {
      Writer writer = new OutputStreamWriter(outputMessage.getBody(), wireFeedEncoding);
      feedOutput.output(wireFeed, writer);
    }
    catch (FeedException ex) {
      throw new HttpMessageNotWritableException("Could not write WireFeed: " + ex.getMessage(), ex);
    }
  }
View Full Code Here


      wireFeed.setEncoding("UTF-8");
    }

    WireFeedOutput feedOutput = new WireFeedOutput();
    ServletOutputStream out = response.getOutputStream();
    feedOutput.output(wireFeed, new OutputStreamWriter(out, wireFeed.getEncoding()));
    out.flush();
  }

  /**
   * Create a new feed to hold the entries.
View Full Code Here

    public void testReadWrite() throws Exception {
        Feed feed = createFeed();
        final StringWriter sw = new StringWriter();
        final WireFeedOutput output = new WireFeedOutput();
        output.output(feed, sw);
        sw.close();
        final StringReader reader = new StringReader(sw.toString());
        final WireFeedInput input = new WireFeedInput();
        feed = (Feed) input.build(reader);
        reader.close();
View Full Code Here

    public void testXML() throws Exception {
        final Feed feed = createFeed();
        final StringWriter sw = new StringWriter();
        final WireFeedOutput output = new WireFeedOutput();
        output.output(feed, sw);
        sw.close();
        assertTrue(sw.toString().contains("<test xmlns=\"\">Hello Hello</test>"));
    }

}
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.