Google Data APIs Client Library (1.41.1)



com.google.gdata.data
Class OtherContent

java.lang.Object
  extended by com.google.gdata.data.Content
      extended by com.google.gdata.data.OtherContent
All Implemented Interfaces:
IContent

public class OtherContent
extends Content

Variant of Content for entries containing miscellaneous inlined content types.


Nested Class Summary
 class OtherContent.AtomHandler
          Parses XML in the Atom format.
 
Nested classes/interfaces inherited from class com.google.gdata.data.Content
Content.ChildHandlerInfo
 
Nested classes/interfaces inherited from interface com.google.gdata.data.IContent
IContent.Type
 
Field Summary
protected  byte[] bytes
          Binary Contents.
protected  Extension ext
          Extension content.
protected  java.lang.String lang
          Language.
protected  ContentType mimeType
          MIME type.
protected  java.lang.String text
          Text contents.
protected  XmlBlob xml
          XML contents.
 
Constructor Summary
OtherContent()
           
 
Method Summary
 void generateAtom(com.google.gdata.util.common.xml.XmlWriter w, ExtensionProfile extProfile)
          Generates XML in the Atom format.
 void generateRss(com.google.gdata.util.common.xml.XmlWriter w, ExtensionProfile extProfile)
          Generates XML in the RSS format.
 byte[] getBytes()
           
 java.lang.String getLang()
          Returns the human language that this content is written in.
 ContentType getMimeType()
           
 java.lang.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(java.lang.String v)
          Specifies the human language that this content is written in.
 void setMimeType(ContentType v)
          Specifies the MIME type.
 void setText(java.lang.String v)
          Specifies the plain-text contents.
 void setXml(XmlBlob v)
          Specifies the XML contents.
 void setXmlContent(Extension extension)
          Sets the nested xml content.
 
Methods inherited from class com.google.gdata.data.Content
getChildHandler
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mimeType

protected ContentType mimeType
MIME type.


lang

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


ext

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


xml

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


text

protected java.lang.String text
Text contents. Valid only for text types (starting with "text/").


bytes

protected byte[] bytes
Binary Contents. Valid if neither XML nor text contents are valid.

Constructor Detail

OtherContent

public OtherContent()
Method Detail

getType

public int getType()
Description copied from class: Content
Returns this content's type. See IContent.Type for the set of expected values.

Specified by:
getType in interface IContent
Specified by:
getType in class Content
Returns:
the type of this content

getMimeType

public ContentType getMimeType()
Returns:
the MIME type

setMimeType

public void setMimeType(ContentType v)
Specifies the MIME type.


getLang

public java.lang.String getLang()
Description copied from class: Content
Returns the human language that this content is written in.

Specified by:
getLang in interface IContent
Specified by:
getLang in class Content
Returns:
the human language that this content is written in

setLang

public void setLang(java.lang.String v)
Specifies the human language that this content is written in.


getXmlContent

public Extension getXmlContent()
Returns the nested xml content.


setXmlContent

public void setXmlContent(Extension extension)
Sets the nested xml content.


getXml

public XmlBlob getXml()
Returns:
the XML contents

setXml

public void setXml(XmlBlob v)
Specifies the XML contents.


getText

public java.lang.String getText()
Returns:
the plain text contents

setText

public void setText(java.lang.String v)
Specifies the plain-text contents.


getBytes

public byte[] getBytes()
Returns:
the binary contents

setBytes

public void setBytes(byte[] v)
Specifies the binary contents.


generateAtom

public void generateAtom(com.google.gdata.util.common.xml.XmlWriter w,
                         ExtensionProfile extProfile)
                  throws java.io.IOException
Generates XML in the Atom format.

Specified by:
generateAtom in class Content
Parameters:
w - output writer
extProfile - Extension Profile for nested extensions
Throws:
java.io.IOException

generateRss

public void generateRss(com.google.gdata.util.common.xml.XmlWriter w,
                        ExtensionProfile extProfile)
                 throws java.io.IOException
Generates XML in the RSS format.

Specified by:
generateRss in class Content
Parameters:
w - output writer
extProfile - Extension Profile for nested extensions
Throws:
java.io.IOException