Class AbstractAtomFeedParser<T> (1.44.2)

public abstract class AbstractAtomFeedParser<T>

Beta
Abstract base class for an Atom feed parser when the feed type is known in advance.

Implementation is not thread-safe.

Inheritance

Object > AbstractAtomFeedParser<T>

Type Parameter

Name Description
T

Constructors

AbstractAtomFeedParser(XmlNamespaceDictionary namespaceDictionary, XmlPullParser parser, InputStream inputStream, Class<T> feedClass)

protected AbstractAtomFeedParser(XmlNamespaceDictionary namespaceDictionary, XmlPullParser parser, InputStream inputStream, Class<T> feedClass)
Parameters
Name Description
namespaceDictionary XmlNamespaceDictionary

XML namespace dictionary

parser org.xmlpull.v1.XmlPullParser

XML pull parser to use

inputStream InputStream

input stream to read

feedClass Class<T>

feed class to parse

Methods

close()

public void close()

Closes the underlying parser.

Exceptions
Type Description
IOException

getFeedClass()

public final Class<T> getFeedClass()

Returns the feed class to parse.

Returns
Type Description
Class<T>

getInputStream()

public final InputStream getInputStream()

Returns the input stream to read.

Returns
Type Description
InputStream

getNamespaceDictionary()

public final XmlNamespaceDictionary getNamespaceDictionary()

Returns the XML namespace dictionary.

Returns
Type Description
XmlNamespaceDictionary

getParser()

public final XmlPullParser getParser()

Returns the XML pull parser to use.

Returns
Type Description
org.xmlpull.v1.XmlPullParser

parseEntryInternal()

protected abstract Object parseEntryInternal()

Parses a single entry.

Returns
Type Description
Object

object representing the entry

Exceptions
Type Description
IOException

I/O exception

org.xmlpull.v1.XmlPullParserException

I/O exception

parseFeed()

public T parseFeed()

Parse the feed and return a new parsed instance of the feed type. This method can be skipped if all you want are the items.

Returns
Type Description
T
Exceptions
Type Description
IOException

I/O exception

org.xmlpull.v1.XmlPullParserException

I/O exception

parseNextEntry()

public Object parseNextEntry()

Parse the next item in the feed and return a new parsed instance of the item type. If there is no item to parse, it will return null and automatically close the parser (in which case there is no need to call #close().

Returns
Type Description
Object
Exceptions
Type Description
IOException

I/O exception

org.xmlpull.v1.XmlPullParserException

I/O exception