Class AtomFeedParser<T,E> (1.43.1)

public final class AtomFeedParser<T,E> extends AbstractAtomFeedParser<T>

Beta
Atom feed pull parser when the Atom entry class is known in advance.

Implementation is not thread-safe.

Inheritance

Object > AbstractAtomFeedParser > AtomFeedParser<T,E>

Type Parameters

NameDescription
T
E

Static Methods

<T,E>create(HttpResponse response, XmlNamespaceDictionary namespaceDictionary, Class<T> feedClass, Class<E> entryClass)

public static AtomFeedParser<T,E> <T,E>create(HttpResponse response, XmlNamespaceDictionary namespaceDictionary, Class<T> feedClass, Class<E> entryClass)

Parses the given HTTP response using the given feed class and entry class.

Parameters
NameDescription
responseHttpResponse

HTTP response

namespaceDictionaryXmlNamespaceDictionary

XML namespace dictionary

feedClassClass<T>

feed class

entryClassClass<E>

entry class

Returns
TypeDescription
AtomFeedParser<T,E>

Atom feed parser

Exceptions
TypeDescription
IOException

I/O exception

org.xmlpull.v1.XmlPullParserException

I/O exception

Constructors

AtomFeedParser(XmlNamespaceDictionary namespaceDictionary, XmlPullParser parser, InputStream inputStream, Class<T> feedClass, Class<E> entryClass)

public AtomFeedParser(XmlNamespaceDictionary namespaceDictionary, XmlPullParser parser, InputStream inputStream, Class<T> feedClass, Class<E> entryClass)
Parameters
NameDescription
namespaceDictionaryXmlNamespaceDictionary

XML namespace dictionary

parserorg.xmlpull.v1.XmlPullParser

XML pull parser to use

inputStreamInputStream

input stream to read

feedClassClass<T>

feed class to parse

entryClassClass<E>

Methods

getEntryClass()

public final Class<E> getEntryClass()

Returns the Atom entry class to parse.

Returns
TypeDescription
Class<E>

parseEntryInternal()

protected Object parseEntryInternal()

Parses a single entry.

Returns
TypeDescription
Object
Overrides
Exceptions
TypeDescription
IOException
org.xmlpull.v1.XmlPullParserException

parseNextEntry()

public E 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
TypeDescription
E
Overrides
Exceptions
TypeDescription
IOException
org.xmlpull.v1.XmlPullParserException