# Google Data APIs Client Library (1.43.0)

## com.google.gdata.data
Class Content

    java.lang.Object
      com.google.gdata.data.Content

All Implemented Interfaces:
  IContent

Direct Known Subclasses:
  OtherContent, OutOfLineContent, TextContent

    public abstract class Content

extends java.lang.Object
implements IContent

Abstract base class for entry content.

Nested Class Summary
`static class` `Content.ChildHandlerInfo` Return type for `getChildHandler(ExtensionProfile, Attributes)` contains an element handler and a content element.

Nested classes/interfaces inherited from interface com.google.gdata.data.IContent
`IContent.Type`

Constructor Summary
`Content()`

Method Summary
`abstract void` `generateAtom(com.google.gdata.util.common.xml.XmlWriter w, ExtensionProfile extProfile)` Generates XML in the Atom format.
`abstract void` `generateRss(com.google.gdata.util.common.xml.XmlWriter w, ExtensionProfile extProfile)` Generates XML in the RSS format.
`static Content.ChildHandlerInfo` `getChildHandler(ExtensionProfile extProfile, org.xml.sax.Attributes attrs)` Parses XML in the Atom format.
`abstract java.lang.String` `getLang()` Returns the human language that this content is written in.
`abstract int` `getType()` Returns this content's type.

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

Constructor Detail

### Content

    public Content()

Method Detail

### getType

    public abstract int getType()

  Returns this content's type. See `IContent.Type` for the set of expected values.

  Specified by:
    `getType` in interface `IContent`
  Returns:
    the type of content.

### getLang

    public abstract java.lang.String getLang()

  Returns the human language that this content is written in.

  Specified by:
    `getLang` in interface `IContent`
  Returns:
    the language of the content if available, or null if not.

### generateAtom

    public abstract void generateAtom(com.google.gdata.util.common.xml.XmlWriter w,
                                      ExtensionProfile extProfile)
                               throws java.io.IOException

  Generates XML in the Atom format.

  Parameters:
    `w` - output writer
    `extProfile` - extension profile for nested extensions.
  Throws:
    `java.io.IOException`

### generateRss

    public abstract void generateRss(com.google.gdata.util.common.xml.XmlWriter w,
                                     ExtensionProfile extProfile)
                              throws java.io.IOException

  Generates XML in the RSS format.

  Parameters:
    `w` - output writer
    `extProfile` - extension profile for nested extensions.
  Throws:
    `java.io.IOException`

### getChildHandler

    public static Content.ChildHandlerInfo getChildHandler(ExtensionProfile extProfile,
                                                           org.xml.sax.Attributes attrs)
                                                    throws ParseException,
                                                           java.io.IOException

  Parses XML in the Atom format.

  Parameters:
    `extProfile` - ExtensionProfile used for nested content.
    `attrs` - XML attributes of the Content node. Used to determine the type of this node.
  Returns:
    a child handler
  Throws:
    `ParseException`
    `java.io.IOException`