# Google Data APIs Client Library (1.43.0)

## com.google.gdata.util
Class ParseUtil

    java.lang.Object
      com.google.gdata.util.ParseUtil

    public class ParseUtil

extends java.lang.Object

Helper class with static parse methods to parse entries and feeds based on the old or new data model as appropriate.

Constructor Summary
`ParseUtil()`

Method Summary
`static IEntry` `readEntry(ParseSource source)` Reads an entry from a parse source.

`static

`<T extends IEntry> T`

`

`readEntry(ParseSource source, java.lang.Class<T> requestedClass, ExtensionProfile extProfile, com.google.gdata.model.Schema schema)`
Reads an entry from a parse source, returning an instance of the requested class, and using the given extension profile if parsing into the old data model.

`static IFeed` `readFeed(ParseSource source)` Reads a feed from a parse source.

`static

`<F extends IFeed> F`

`

`readFeed(ParseSource source, java.lang.Class<F> requestedClass, ExtensionProfile extProfile, com.google.gdata.model.Schema schema)`
This method provides the base implementation of feed reading using either static or dynamic typing.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### ParseUtil

    public ParseUtil()

Method Detail

### readEntry

    public static IEntry readEntry(ParseSource source)
                            throws java.io.IOException,
                                   ParseException,
                                   ServiceException

  Reads an entry from a parse source. This will use dynamic typing to adapt the response to the most specific subtype available.

  Throws:
    `java.io.IOException`
    `ParseException`
    `ServiceException`

### readEntry

    public static <T extends IEntry> T readEntry(ParseSource source,
                                                 java.lang.Class<T> requestedClass,
                                                 ExtensionProfile extProfile,
                                                 com.google.gdata.model.Schema schema)
                                      throws java.io.IOException,
                                             ParseException,
                                             ServiceException

  Reads an entry from a parse source, returning an instance of the requested class, and using the given extension profile if parsing into the old data model. If the requested class is null the response will be parsed into the most specific subtype possible, using dynamic typing. If the requested class is not null an instance of the requested type or a subtype will be returned.

  Throws:
    `java.io.IOException`
    `ParseException`
    `ServiceException`

### readFeed

    public static IFeed readFeed(ParseSource source)
                          throws java.io.IOException,
                                 ParseException,
                                 ServiceException

  Reads a feed from a parse source. This will use dynamic typing to adapt the response to the most specific subtype available.

  Throws:
    `java.io.IOException`
    `ParseException`
    `ServiceException`

### readFeed

    public static <F extends IFeed> F readFeed(ParseSource source,
                                               java.lang.Class<F> requestedClass,
                                               ExtensionProfile extProfile,
                                               com.google.gdata.model.Schema schema)
                                    throws java.io.IOException,
                                           ParseException,
                                           ServiceException

  This method provides the base implementation of feed reading using either static or dynamic typing. If feedClass is non-null, the method is guaranteed to return an instance of this type, otherwise adaptation will be used to determine the type. The source object may be either an InputStream, Reader, or XmlParser.

  Throws:
    `java.io.IOException`
    `ParseException`
    `ServiceException`