Class AtomFeedParser<T,E> (1.43.2)

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

Name Description
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
Name Description
response HttpResponse

HTTP response

namespaceDictionary XmlNamespaceDictionary

XML namespace dictionary

feedClass Class<T>

feed class

entryClass Class<E>

entry class

Returns
Type Description
AtomFeedParser<T,E>

Atom feed parser

Exceptions
Type Description
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
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

entryClass Class<E>

Methods

getEntryClass()

public final Class<E> getEntryClass()

Returns the Atom entry class to parse.

Returns
Type Description
Class<E>

parseEntryInternal()

protected Object parseEntryInternal()

Parses a single entry.

Returns
Type Description
Object
Overrides
Exceptions
Type Description
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
Type Description
E
Overrides
Exceptions
Type Description
IOException
org.xmlpull.v1.XmlPullParserException