Package com.sun.syndication.io

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


        item.setContent(content);
        channel.getItems().add(item);

        StringWriter sw = new StringWriter();
        WireFeedOutput output = new WireFeedOutput();
        output.output(channel, sw);
        sw.close();

        return sw.toString();
    }
View Full Code Here


        Reader r = new StringReader(createFeed());
        WireFeedInput input = new WireFeedInput();
        Channel channel = (Channel) input.build(r);
        StringWriter sw = new StringWriter();
        WireFeedOutput output = new WireFeedOutput();
        output.output(channel, sw);
        sw.close();
        r = new StringReader(sw.toString());
        channel = (Channel) input.build(r);
        sw = new StringWriter();
        output.output(channel, sw);
View Full Code Here

        output.output(channel, sw);
        sw.close();
        r = new StringReader(sw.toString());
        channel = (Channel) input.build(r);
        sw = new StringWriter();
        output.output(channel, sw);
        sw.close();
        System.out.println(sw);
    }

}
View Full Code Here

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

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

}
View Full Code Here

        atom.setOtherLinks(relateds);


        StringWriter writer = new StringWriter();
        WireFeedOutput output = new WireFeedOutput();
        output.output(atom, writer);
        writer.close();
        System.out.print(writer.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.