Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
JBoss, a division of Red Hat * Copyright 2012, Red Hat Middleware, LLC, and individual * contributors as indicated by the

tag. See the * copyright.txt in the distribution for a full listing of * individual contributors. * * This is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this software; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: * /
import  com.sun.syndication.feed.synd.SyndEntry;
import  com.sun.syndication.feed.synd.SyndFeed;
import  com.sun.syndication.feed.synd.SyndPerson;

Viliam Rockai
public class RomeRssControllerBean {
    private static final Logger log = LoggerFactory.getLogger(RomeRssControllerBean.class);
    public static List<RssTitleBeangetFeedTitles(URL sourceint headsizethrows IOException, FeedException {
        List<RssTitleBeanrssTitleBeanList = new ArrayList<RssTitleBean>();
        XmlReader reader = null;
        try {
            reader = new XmlReader(source);
            SyndFeed feed = new SyndFeedInput().build(reader);
            for (Iterator i = feed.getEntries().iterator(); i.hasNext() && (headsize-- > 0);) {
                SyndEntry entry = (SyndEntry);
                RssTitleBean rssTitleBean = new RssTitleBean();
                List<RssAuthorBeanrssAuthors = new ArrayList<RssAuthorBean>();
                for (SyndPerson author : (List<SyndPerson>) entry.getAuthors()) {
                    RssAuthorBean rssAuthorBean = new RssAuthorBean();
        } finally {
            if (reader != null) {
        return rssTitleBeanList;
New to GrepCode? Check out our FAQ X