T
- feed type@Beta public abstract class AbstractAtomFeedParser<T> extends Object
Beta
Implementation is not thread-safe.
Modifier | Constructor and Description |
---|---|
protected |
AbstractAtomFeedParser(XmlNamespaceDictionary namespaceDictionary,
org.xmlpull.v1.XmlPullParser parser,
InputStream inputStream,
Class<T> feedClass) |
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes the underlying parser.
|
Class<T> |
getFeedClass()
Returns the feed class to parse.
|
InputStream |
getInputStream()
Returns the input stream to read.
|
XmlNamespaceDictionary |
getNamespaceDictionary()
Returns the XML namespace dictionary.
|
org.xmlpull.v1.XmlPullParser |
getParser()
Returns the XML pull parser to use.
|
protected abstract Object |
parseEntryInternal()
Parses a single entry.
|
T |
parseFeed()
Parse the feed and return a new parsed instance of the feed type.
|
Object |
parseNextEntry()
Parse the next item in the feed and return a new parsed instance of the item type.
|
protected AbstractAtomFeedParser(XmlNamespaceDictionary namespaceDictionary, org.xmlpull.v1.XmlPullParser parser, InputStream inputStream, Class<T> feedClass)
namespaceDictionary
- XML namespace dictionaryparser
- XML pull parser to useinputStream
- input stream to readfeedClass
- feed class to parsepublic final org.xmlpull.v1.XmlPullParser getParser()
public final InputStream getInputStream()
public final XmlNamespaceDictionary getNamespaceDictionary()
public T parseFeed() throws IOException, org.xmlpull.v1.XmlPullParserException
IOException
- I/O exceptionorg.xmlpull.v1.XmlPullParserException
- XML pull parser exceptionpublic Object parseNextEntry() throws IOException, org.xmlpull.v1.XmlPullParserException
null
and automatically close the parser (in which case
there is no need to call close()
.IOException
- I/O exceptionorg.xmlpull.v1.XmlPullParserException
- XML pull parser exceptionpublic void close() throws IOException
IOException
protected abstract Object parseEntryInternal() throws IOException, org.xmlpull.v1.XmlPullParserException
IOException
- I/O exceptionorg.xmlpull.v1.XmlPullParserException
- XML pull parser exceptionCopyright © 2011–2022 Google. All rights reserved.