# Class AtomFeedParser&lt;T,E&gt; (2.1.0)

<button class="button button-with-icon cloud-select-dropdown__button " aria-haspopup="true">Version latest</button>

- [2.1.0 (latest)](https://docs.cloud.google.com/java/docs/reference/google-http-client/latest/com.google.api.client.http.xml.atom.AtomFeedParser)
- [2.0.3](https://docs.cloud.google.com/java/docs/reference/google-http-client/2.0.3/com.google.api.client.http.xml.atom.AtomFeedParser)
- [1.47.1](https://docs.cloud.google.com/java/docs/reference/google-http-client/1.47.1/com.google.api.client.http.xml.atom.AtomFeedParser)
- [1.46.3](https://docs.cloud.google.com/java/docs/reference/google-http-client/1.46.3/com.google.api.client.http.xml.atom.AtomFeedParser)
- [1.45.3](https://docs.cloud.google.com/java/docs/reference/google-http-client/1.45.3/com.google.api.client.http.xml.atom.AtomFeedParser)
- [1.44.2](https://docs.cloud.google.com/java/docs/reference/google-http-client/1.44.2/com.google.api.client.http.xml.atom.AtomFeedParser)
- [1.43.2](https://docs.cloud.google.com/java/docs/reference/google-http-client/1.43.2/com.google.api.client.http.xml.atom.AtomFeedParser)
- [1.42.3](https://docs.cloud.google.com/java/docs/reference/google-http-client/1.42.3/com.google.api.client.http.xml.atom.AtomFeedParser)
- [1.41.8](https://docs.cloud.google.com/java/docs/reference/google-http-client/1.41.8/com.google.api.client.http.xml.atom.AtomFeedParser)

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

[Beta](https://docs.cloud.google.com/java/docs/reference/google-http-client/latest/com.google.api.client.util.Beta)   

Atom feed pull parser when the Atom entry class is known in advance.

Implementation is not thread-safe.

## Inheritance

[Object](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html) \> [AbstractAtomFeedParser](https://docs.cloud.google.com/java/docs/reference/google-http-client/latest/com.google.api.client.xml.atom.AbstractAtomFeedParser) \> AtomFeedParser\<T,E\>

## Inherited Members

[AbstractAtomFeedParser.close()](https://docs.cloud.google.com/java/docs/reference/google-http-client/latest/com.google.api.client.xml.atom.AbstractAtomFeedParser#com_google_api_client_xml_atom_AbstractAtomFeedParser_close__) [AbstractAtomFeedParser.getFeedClass()](https://docs.cloud.google.com/java/docs/reference/google-http-client/latest/com.google.api.client.xml.atom.AbstractAtomFeedParser#com_google_api_client_xml_atom_AbstractAtomFeedParser_getFeedClass__) [AbstractAtomFeedParser.getInputStream()](https://docs.cloud.google.com/java/docs/reference/google-http-client/latest/com.google.api.client.xml.atom.AbstractAtomFeedParser#com_google_api_client_xml_atom_AbstractAtomFeedParser_getInputStream__) [AbstractAtomFeedParser.getNamespaceDictionary()](https://docs.cloud.google.com/java/docs/reference/google-http-client/latest/com.google.api.client.xml.atom.AbstractAtomFeedParser#com_google_api_client_xml_atom_AbstractAtomFeedParser_getNamespaceDictionary__) [AbstractAtomFeedParser.getParser()](https://docs.cloud.google.com/java/docs/reference/google-http-client/latest/com.google.api.client.xml.atom.AbstractAtomFeedParser#com_google_api_client_xml_atom_AbstractAtomFeedParser_getParser__) [AbstractAtomFeedParser.parseEntryInternal()](https://docs.cloud.google.com/java/docs/reference/google-http-client/latest/com.google.api.client.xml.atom.AbstractAtomFeedParser#com_google_api_client_xml_atom_AbstractAtomFeedParser_parseEntryInternal__) [AbstractAtomFeedParser.parseFeed()](https://docs.cloud.google.com/java/docs/reference/google-http-client/latest/com.google.api.client.xml.atom.AbstractAtomFeedParser#com_google_api_client_xml_atom_AbstractAtomFeedParser_parseFeed__) [AbstractAtomFeedParser.parseNextEntry()](https://docs.cloud.google.com/java/docs/reference/google-http-client/latest/com.google.api.client.xml.atom.AbstractAtomFeedParser#com_google_api_client_xml_atom_AbstractAtomFeedParser_parseNextEntry__) [Object.clone()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#clone--) [Object.equals(Object)](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#equals-java.lang.Object-) [Object.finalize()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#finalize--) [Object.getClass()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#getClass--) [Object.hashCode()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#hashCode--) [Object.notify()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#notify--) [Object.notifyAll()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#notifyAll--) [Object.toString()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#toString--) [Object.wait()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait--) [Object.wait(long)](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait-long-) [Object.wait(long,int)](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait-long-int-)

| ## 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.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `response` | `https://docs.cloud.google.com/java/docs/reference/google-http-client/latest/com.google.api.client.http.HttpResponse` HTTP response |
| `namespaceDictionary` | `https://docs.cloud.google.com/java/docs/reference/google-http-client/latest/com.google.api.client.xml.XmlNamespaceDictionary` XML namespace dictionary |
| `feedClass` | `https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html<T>` feed class |
| `entryClass` | `https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html<E>` entry class |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-http-client/latest/com.google.api.client.http.xml.atom.AtomFeedParser<T,E>` | Atom feed parser |

| **Exceptions** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html` | 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)

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `namespaceDictionary` | `https://docs.cloud.google.com/java/docs/reference/google-http-client/latest/com.google.api.client.xml.XmlNamespaceDictionary` XML namespace dictionary |
| `parser` | `org.xmlpull.v1.XmlPullParser` XML pull parser to use |
| `inputStream` | `https://docs.oracle.com/javase/8/docs/api/java/io/InputStream.html` input stream to read |
| `feedClass` | `https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html<T>` feed class to parse |
| `entryClass` | `https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html<E>` |

## Methods

### getEntryClass()

    public final Class<E> getEntryClass()

Returns the Atom entry class to parse.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html<E>` |   |

### parseEntryInternal()

    protected Object parseEntryInternal()

Parses a single entry.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html` |   |

**Overrides** [AbstractAtomFeedParser\<T\>.parseEntryInternal()](https://docs.cloud.google.com/java/docs/reference/google-http-client/latest/com.google.api.client.xml.atom.AbstractAtomFeedParser#com_google_api_client_xml_atom_AbstractAtomFeedParser_parseEntryInternal__)

| **Exceptions** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html` |   |
| `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().

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `E` |   |

**Overrides** [AbstractAtomFeedParser\<T\>.parseNextEntry()](https://docs.cloud.google.com/java/docs/reference/google-http-client/latest/com.google.api.client.xml.atom.AbstractAtomFeedParser#com_google_api_client_xml_atom_AbstractAtomFeedParser_parseNextEntry__)

| **Exceptions** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html` |   |
| `org.xmlpull.v1.XmlPullParserException` |   |