@SuppressWarnings({ "rawtypes", "unchecked" })
    public static List<FeedItem> parse(Object input, int size, boolean isPodcast) throws IOException {
        AbstractRssReader reader;
        if (isPodcast) {
            reader = new ItunesRssReader();
        }
        else {
            reader = new RssReader();
        }
        if (input instanceof String) {
            return convert((List<Item>) reader.read((String) input).limit(size).collect(Collectors.toList()));
        }
        return convert((List<Item>) reader.read((InputStream) input).limit(size).collect(Collectors.toList()));
    }
Parses the input into a list of FeedItem objects.

@param input     The input source, either a String representing the URL of the feed or an InputStream.
@param size      The maximum number of items to retrieve from the feed.
@param isPodcast Specifies whether the feed is a podcast feed.
@return A list of FeedItem objects parsed from the input.
@throws IOException If an I/O error occurs during the parsing process.
primefaces/src/main/java/org/primefaces/component/feedreader/RSSUtils.java