Package com.rometools.rome.feed.rss

Examples of com.rometools.rome.feed.rss.Enclosure


            final List<Enclosure> enclosures = new ArrayList<Enclosure>();

            for (final Element eEnclosure : eEnclosures) {

                final Enclosure enclosure = new Enclosure();
                // getRSSNamespace()); DONT KNOW WHY DOESN'T WORK
                final String url = eEnclosure.getAttributeValue("url");
                if (url != null) {
                    enclosure.setUrl(url);
                }

                // getRSSNamespace()); DONT KNOW WHY DOESN'T WORK
                final String length = eEnclosure.getAttributeValue("length");
                enclosure.setLength(NumberParser.parseLong(length, 0L));

                // getRSSNamespace()); DONT KNOW WHY DOESN'T WORK
                final String type = eEnclosure.getAttributeValue("type");
                if (type != null) {
                    enclosure.setType(type);
                }

                enclosures.add(enclosure);

            }
View Full Code Here


    }

    protected List<Enclosure> createEnclosures(final List<SyndEnclosure> sEnclosures) {
        final List<Enclosure> enclosures = new ArrayList<Enclosure>();
        for (final SyndEnclosure sEnc : sEnclosures) {
            final Enclosure enc = new Enclosure();
            enc.setUrl(sEnc.getUrl());
            enc.setType(sEnc.getType());
            enc.setLength(sEnc.getLength());
            enclosures.add(enc);
        }
        return enclosures;
    }
View Full Code Here

TOP

Related Classes of com.rometools.rome.feed.rss.Enclosure

Copyright © 2018 www.massapicom. 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.