T - feed typeE - entry type@Beta public final class AtomFeedParser<T,E> extends AbstractAtomFeedParser<T>
Beta Implementation is not thread-safe.
| Constructor and Description |
|---|
AtomFeedParser(XmlNamespaceDictionary namespaceDictionary,
org.xmlpull.v1.XmlPullParser parser,
java.io.InputStream inputStream,
java.lang.Class<T> feedClass,
java.lang.Class<E> entryClass) |
| Modifier and Type | Method and Description |
|---|---|
static <T,E> AtomFeedParser<T,E> |
create(HttpResponse response,
XmlNamespaceDictionary namespaceDictionary,
java.lang.Class<T> feedClass,
java.lang.Class<E> entryClass)
Parses the given HTTP response using the given feed class and entry class.
|
java.lang.Class<E> |
getEntryClass()
Returns the Atom entry class to parse.
|
protected java.lang.Object |
parseEntryInternal()
Parses a single entry.
|
E |
parseNextEntry()
Parse the next item in the feed and return a new parsed instance of the item type.
|
close, getFeedClass, getInputStream, getNamespaceDictionary, getParser, parseFeedpublic AtomFeedParser(XmlNamespaceDictionary namespaceDictionary, org.xmlpull.v1.XmlPullParser parser, java.io.InputStream inputStream, java.lang.Class<T> feedClass, java.lang.Class<E> entryClass)
namespaceDictionary - XML namespace dictionaryparser - XML pull parser to useinputStream - input stream to readfeedClass - feed class to parsepublic E parseNextEntry() throws java.io.IOException, org.xmlpull.v1.XmlPullParserException
AbstractAtomFeedParsernull and automatically close the parser (in which case
there is no need to call AbstractAtomFeedParser.close().parseNextEntry in class AbstractAtomFeedParser<T>java.io.IOException - I/O exceptionorg.xmlpull.v1.XmlPullParserException - XML pull parser exceptionprotected java.lang.Object parseEntryInternal()
throws java.io.IOException,
org.xmlpull.v1.XmlPullParserException
AbstractAtomFeedParserparseEntryInternal in class AbstractAtomFeedParser<T>java.io.IOException - I/O exceptionorg.xmlpull.v1.XmlPullParserException - XML pull parser exceptionpublic final java.lang.Class<E> getEntryClass()
public static <T,E> AtomFeedParser<T,E> create(HttpResponse response, XmlNamespaceDictionary namespaceDictionary, java.lang.Class<T> feedClass, java.lang.Class<E> entryClass) throws java.io.IOException, org.xmlpull.v1.XmlPullParserException
T - feed typeE - entry typeresponse - HTTP responsenamespaceDictionary - XML namespace dictionaryfeedClass - feed classentryClass - entry classjava.io.IOException - I/O exceptionorg.xmlpull.v1.XmlPullParserException - XML pull parser exceptionCopyright © 2011-2018 Google. All Rights Reserved.