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.
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.
Name | Description |
response | HttpResponse HTTP response |
namespaceDictionary | XmlNamespaceDictionary XML namespace dictionary |
feedClass | Class<T> feed class |
entryClass | Class<E> entry class |
Type | Description |
AtomFeedParser<T,E> | Atom feed parser |
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)
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.
Type | Description |
Class<E> |
parseEntryInternal()
protected Object parseEntryInternal()
Parses a single entry.
Type | Description |
Object |
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().
Type | Description |
E |
Type | Description |
IOException | |
org.xmlpull.v1.XmlPullParserException |