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,
InputStream inputStream,
Class<T> feedClass,
Class<E> entryClass) |
Modifier and Type | Method and Description |
---|---|
static <T,E> AtomFeedParser<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.
|
Class<E> |
getEntryClass()
Returns the Atom entry class to parse.
|
protected 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, parseFeed
public AtomFeedParser(XmlNamespaceDictionary namespaceDictionary, org.xmlpull.v1.XmlPullParser parser, InputStream inputStream, Class<T> feedClass, Class<E> entryClass)
namespaceDictionary
- XML namespace dictionaryparser
- XML pull parser to useinputStream
- input stream to readfeedClass
- feed class to parsepublic E parseNextEntry() throws IOException, org.xmlpull.v1.XmlPullParserException
AbstractAtomFeedParser
null
and automatically close the parser (in which case
there is no need to call AbstractAtomFeedParser.close()
.parseNextEntry
in class AbstractAtomFeedParser<T>
IOException
- I/O exceptionorg.xmlpull.v1.XmlPullParserException
- XML pull parser exceptionprotected Object parseEntryInternal() throws IOException, org.xmlpull.v1.XmlPullParserException
AbstractAtomFeedParser
parseEntryInternal
in class AbstractAtomFeedParser<T>
IOException
- I/O exceptionorg.xmlpull.v1.XmlPullParserException
- XML pull parser exceptionpublic final Class<E> getEntryClass()
public static <T,E> AtomFeedParser<T,E> create(HttpResponse response, XmlNamespaceDictionary namespaceDictionary, Class<T> feedClass, Class<E> entryClass) throws IOException, org.xmlpull.v1.XmlPullParserException
T
- feed typeE
- entry typeresponse
- HTTP responsenamespaceDictionary
- XML namespace dictionaryfeedClass
- feed classentryClass
- entry classIOException
- I/O exceptionorg.xmlpull.v1.XmlPullParserException
- XML pull parser exceptionCopyright © 2011–2023 Google. All rights reserved.