public class

OtherContent

extends Content
java.lang.Object
   ↳ com.google.gdata.data.Content
     ↳ com.google.gdata.data.OtherContent

Class Overview

Variant of Content for entries containing miscellaneous inlined content types.

Summary

Nested Classes
class OtherContent.AtomHandler Parses XML in the Atom format. 
Fields
protected byte[] bytes Binary Contents.
protected Extension ext Extension content.
protected String lang Language.
protected ContentType mimeType MIME type.
protected String text Text contents.
protected XmlBlob xml XML contents.
Public Constructors
OtherContent()
Public Methods
void generateAtom(XmlWriter w, ExtensionProfile extProfile)
Generates XML in the Atom format.
void generateRss(XmlWriter w, ExtensionProfile extProfile)
Generates XML in the RSS format.
byte[] getBytes()
String getLang()
Returns the human language that this content is written in.
ContentType getMimeType()
String getText()
int getType()
Returns this content's type.
XmlBlob getXml()
Extension getXmlContent()
Returns the nested xml content.
void setBytes(byte[] v)
Specifies the binary contents.
void setLang(String v)
Specifies the human language that this content is written in.
void setMimeType(ContentType v)
Specifies the MIME type.
void setText(String v)
Specifies the plain-text contents.
void setXml(XmlBlob v)
Specifies the XML contents.
void setXmlContent(Extension extension)
Sets the nested xml content.
[Expand]
Inherited Methods
From class com.google.gdata.data.Content
From class java.lang.Object
From interface com.google.gdata.data.IContent

Fields

protected byte[] bytes

Binary Contents. Valid if neither XML nor text contents are valid.

protected Extension ext

Extension content. Allows an extension to be set as nested content.

protected String lang

Language. Derived from the current state of xml:lang. Applies to inline text and binary types only.

protected ContentType mimeType

MIME type.

protected String text

Text contents. Valid only for text types (starting with "text/").

protected XmlBlob xml

XML contents. Valid only for XML types (ending with "+xml" or "/xml").

Public Constructors

public OtherContent ()

Public Methods

public void generateAtom (XmlWriter w, ExtensionProfile extProfile)

Generates XML in the Atom format.

Parameters
w Output writer
extProfile Extension Profile for nested extensions
Throws
IOException

public void generateRss (XmlWriter w, ExtensionProfile extProfile)

Generates XML in the RSS format.

Parameters
w Output writer
extProfile Extension Profile for nested extensions
Throws
IOException

public byte[] getBytes ()

Returns
  • the binary contents

public String getLang ()

Returns the human language that this content is written in.

Returns
  • the human language that this content is written in

public ContentType getMimeType ()

Returns
  • the MIME type

public String getText ()

Returns
  • the plain text contents

public int getType ()

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

Returns
  • the type of this content

public XmlBlob getXml ()

Returns
  • the XML contents

public Extension getXmlContent ()

Returns the nested xml content.

public void setBytes (byte[] v)

Specifies the binary contents.

Parameters
v

public void setLang (String v)

Specifies the human language that this content is written in.

Parameters
v

public void setMimeType (ContentType v)

Specifies the MIME type.

Parameters
v

public void setText (String v)

Specifies the plain-text contents.

Parameters
v

public void setXml (XmlBlob v)

Specifies the XML contents.

Parameters
v

public void setXmlContent (Extension extension)

Sets the nested xml content.

Parameters
extension