Possible Duplicate:
How To Discover RSS Feeds for a given URL
Given a URL, I'd like to know whether it's a feed or not.
In Zend Framework, it is possible to import a URL as a feed:
try {
$slashdotRss =
Zend_Feed::import('http://rss.slashdot.org/Slashdot/slashdot');
} catch (Zend_Feed_Exception $e) {
// feed import failed
echo "Exception caught importing feed: {$e->getMessage()}\n";
exit;
}
And if an exception is thrown, then I know the URL is not a feed.
I would like to do the same algorithm in Java, so my question is: How does Zend know whether a URL is a feed or not ?