public class

ParseUtil

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

Class Overview

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

Summary

Public Constructors
ParseUtil()
Public Methods
static <T extends IEntry> T readEntry(ParseSource source, Class<T> requestedClass, ExtensionProfile extProfile, 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 IEntry readEntry(ParseSource source)
Reads an entry from a parse source.
static <F extends IFeed> F readFeed(ParseSource source, Class<F> requestedClass, ExtensionProfile extProfile, Schema schema)
This method provides the base implementation of feed reading using either static or dynamic typing.
static IFeed readFeed(ParseSource source)
Reads a feed from a parse source.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public ParseUtil ()

Public Methods

public static T readEntry (ParseSource source, Class<T> requestedClass, ExtensionProfile extProfile, 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. 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.

Parameters
source
requestedClass
extProfile
schema
Throws
IOException
ParseException
ServiceException

public static IEntry readEntry (ParseSource source)

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

Parameters
source
Throws
IOException
ParseException
ServiceException

public static F readFeed (ParseSource source, Class<F> requestedClass, ExtensionProfile extProfile, Schema schema)

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.

Parameters
source
requestedClass
extProfile
schema
Throws
IOException
ParseException
ServiceException

public static IFeed readFeed (ParseSource source)

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

Parameters
source
Throws
IOException
ParseException
ServiceException