com.google.api.client.xml.atom
Class AtomFeedParser<T,I>

java.lang.Object
  extended by com.google.api.client.xml.atom.AbstractAtomFeedParser<T>
      extended by com.google.api.client.xml.atom.AtomFeedParser<T,I>

public final class AtomFeedParser<T,I>
extends AbstractAtomFeedParser<T>

Atom feed parser when the item class is known in advance.

Since:
1.0
Author:
Yaniv Inbar

Field Summary
 Class<I> entryClass
           
 
Fields inherited from class com.google.api.client.xml.atom.AbstractAtomFeedParser
feedClass, inputStream, namespaceDictionary, parser
 
Constructor Summary
AtomFeedParser()
           
 
Method Summary
static
<T,I> AtomFeedParser<T,I>
create(HttpResponse response, XmlNamespaceDictionary namespaceDictionary, Class<T> feedClass, Class<I> entryClass)
           
protected  Object parseEntryInternal()
           
 I parseNextEntry()
          Parse the next item in the feed and return a new parsed instanceof of the item type.
 
Methods inherited from class com.google.api.client.xml.atom.AbstractAtomFeedParser
close, parseFeed
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

entryClass

public Class<I> entryClass
Constructor Detail

AtomFeedParser

public AtomFeedParser()
Method Detail

parseNextEntry

public I parseNextEntry()
                 throws IOException,
                        org.xmlpull.v1.XmlPullParserException
Description copied from class: AbstractAtomFeedParser
Parse the next item in the feed and return a new parsed instanceof 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 AbstractAtomFeedParser.close().

Overrides:
parseNextEntry in class AbstractAtomFeedParser<T>
Throws:
org.xmlpull.v1.XmlPullParserException
IOException

parseEntryInternal

protected Object parseEntryInternal()
                             throws IOException,
                                    org.xmlpull.v1.XmlPullParserException
Specified by:
parseEntryInternal in class AbstractAtomFeedParser<T>
Throws:
IOException
org.xmlpull.v1.XmlPullParserException

create

public static <T,I> AtomFeedParser<T,I> create(HttpResponse response,
                                               XmlNamespaceDictionary namespaceDictionary,
                                               Class<T> feedClass,
                                               Class<I> entryClass)
                                  throws org.xmlpull.v1.XmlPullParserException,
                                         IOException
Throws:
org.xmlpull.v1.XmlPullParserException
IOException


Copyright © 2010 Google. All Rights Reserved.