我正在尝试使用 Rome1.0 和 Java 访问播客附件中的 .mp3 链接。附件包含类型、url 和长度。我找不到任何文档。Java.net 上的 wiki 已被删除。
public static void main(String[] args) throws IOException, IllegalArgumentException, FeedException
{
URL url = new URL("http://www.theskepticsguide.org/feed/rss.aspx? feed=SGU");
XmlReader reader = null;
/*try {
reader = new XmlReader(url);
SyndFeed feed = new SyndFeedInput().build(reader);
System.out.println("Feed Title: " + feed.getAuthor());
for (Iterator i = feed.getEntries().iterator(); i.hasNext(););
{
SyndEntry entry = (SyndEntry) i.next();
System.out.println("Title: " + entry.getTitle());
System.out.println("Description: " + entry.getDescription().getValue());
System.out.println("Updated: " + entry.getPublishedDate());
//我希望做类似 System.out.println("Enclosure Url:" + entry.getEnclosures()) }
} finally {
if (reader != null)
reader.close();
}*/