org.eclipse.ecf.provider.rss.channel
Class FeedParser

java.lang.Object
  extended by org.eclipse.ecf.provider.rss.channel.FeedParser

public class FeedParser
extends java.lang.Object

Parser class which allows reading in of RSS news channels.

Author:
Sergey Yakovlev

Constructor Summary
FeedParser()
           
 
Method Summary
protected static void dumpStack(java.lang.String msg, java.lang.Throwable e)
           
static RssFeed parse(byte[] b)
          Parse the content of the file specified as byte array.
static RssFeed parse(java.io.File file)
          Parse the content of the file specified as RSS feed.
static RssFeed parse(java.io.InputStream in)
          Parse the content given InputSource as RSS feed.
protected static void trace(java.lang.String msg)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FeedParser

public FeedParser()
Method Detail

trace

protected static void trace(java.lang.String msg)

dumpStack

protected static void dumpStack(java.lang.String msg,
                                java.lang.Throwable e)

parse

public static RssFeed parse(java.io.File file)
                     throws java.io.FileNotFoundException,
                            java.io.IOException,
                            ParseException
Parse the content of the file specified as RSS feed.

Parameters:
file - - The file containing the RSS feed to parse.
Returns:
parsed feed or null if none in use.
Throws:
java.io.FileNotFoundException
java.io.IOException - - If any IO errors occur.
ParseException - - If any parse errors occur during processing.

parse

public static RssFeed parse(byte[] b)
                     throws java.io.IOException,
                            ParseException
Parse the content of the file specified as byte array.

Parameters:
b - - The byte array containing the content to be parsed.
Returns:
parsed feed or null if none in use.
Throws:
java.io.IOException - - If any IO errors occur.
ParseException - - If any parse errors occur during processing.

parse

public static RssFeed parse(java.io.InputStream in)
                     throws java.io.IOException,
                            ParseException
Parse the content given InputSource as RSS feed.

Parameters:
in - - The InputSource containing the content to be parsed.
Returns:
parsed feed or null if none in use.
Throws:
java.io.IOException - - If any IO errors occur.
ParseException - - If any parse errors occur during processing.