com.objectxp.mms.message.smil
Class Media

java.lang.Object
  extended bycom.objectxp.mms.message.smil.Element
      extended bycom.objectxp.mms.message.smil.Media
All Implemented Interfaces:
MMSMessagePart, java.io.Serializable
Direct Known Subclasses:
Animation, Audio, Image, Link, Text, Textstream, Video

public abstract class Media
extends Element
implements MMSMessagePart, java.io.Serializable

Base class for MMS Media elements. Media elements allow the inclusion of media objects into a SMIL presentation. Media objects are included by reference (using a URI).

All the media elements are semantically identical. When playing back a media object, the player must not derive the exact type of the media object from the name of the media object element. Instead, it must rely solely on other sources about the type, such as type information contained in the type attribute, or the type information communicated by a server or the operating system.

Since:
jSMS 2.0
See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.objectxp.mms.message.smil.Element
COMMON_CLASS, COMMON_ID, COMMON_TITLE, COMMON_XML_LANG, CONTCTRL_AUDIO_DESC, CONTCTRL_BITRATE, CONTCTRL_CAPTIONS, CONTCTRL_COMPONENT, CONTCTRL_CPU, CONTCTRL_LANGUAGE, CONTCTRL_OPERATING_SYSTEM, CONTCTRL_OVERDUB_OR_SUBTITLE, CONTCTRL_REQUIRED, CONTCTRL_SCREEN_DEPTH, CONTCTRL_SCREEN_SIZE, LINKING_ACCESSKEY, LINKING_ACTUATE, LINKING_ALT, LINKING_DEST_LEVEL, LINKING_DEST_PLAYSTATE, LINKING_EXTERNAL, LINKING_HREF, LINKING_SHOW, LINKING_SRC_LEVEL, LINKING_SRC_PLAYSTATE, LINKING_TABINDEX, LINKING_TARGET, MEDIA_SRC, MEDIA_TYPE, TIMING_BEGIN, TIMING_DUR, TIMING_END, TIMING_ENDSYNC, TIMING_FILL, TIMING_MAX, TIMING_MIN, TIMING_REPEAT_COUNT, TIMING_REPEAT_DUR
 
Method Summary
 Element addAttribute(java.lang.String name, java.lang.String value)
          Add an attribute for this media element.
 java.lang.String getCharset()
          Get the character set of the content.
 byte[] getContent()
          Get the content data of this message part.
 java.lang.String getContentLocation()
          Get the content location of this message part.
 java.lang.String getContentType()
          Get the content-type of this message part.
 java.lang.String getMimeType()
          Get the mime-type of this message part.
 void setCharset(java.lang.String charset)
          Set the character set (encoding) that has been used for encoding the content.
 java.lang.String toString()
           
 
Methods inherited from class com.objectxp.mms.message.smil.Element
getElements, toXML
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

addAttribute

public Element addAttribute(java.lang.String name,
                            java.lang.String value)
Add an attribute for this media element. Attributes allowed are:

Overrides:
addAttribute in class Element
Parameters:
name - the attribute name
value - the attribute value
Returns:
this Element
Throws:
java.lang.IllegalArgumentException - for invalid attributes

getContentLocation

public java.lang.String getContentLocation()
Description copied from interface: MMSMessagePart
Get the content location of this message part. A SMIL document refers to this location.

Specified by:
getContentLocation in interface MMSMessagePart
Returns:
the location of the content.

getMimeType

public java.lang.String getMimeType()
Description copied from interface: MMSMessagePart
Get the mime-type of this message part. The mime-type is part of the content-type.

Specified by:
getMimeType in interface MMSMessagePart
Returns:
the mimeType of the content.

getContent

public byte[] getContent()
Description copied from interface: MMSMessagePart
Get the content data of this message part.

Specified by:
getContent in interface MMSMessagePart
Returns:
a byte[] with the content data.

toString

public java.lang.String toString()

getCharset

public java.lang.String getCharset()
Description copied from interface: MMSMessagePart
Get the character set of the content. The character set is ignored for binary content.

Specified by:
getCharset in interface MMSMessagePart
Returns:
the character set or null if unset.

setCharset

public void setCharset(java.lang.String charset)
Description copied from interface: MMSMessagePart
Set the character set (encoding) that has been used for encoding the content. If unset, jSMS assumes that the text has been encoded using your platforms default character encoding. The character set is ignored for binary content.

Specified by:
setCharset in interface MMSMessagePart
Parameters:
charset - the character set (e.g. "UTF-8").

getContentType

public java.lang.String getContentType()
Description copied from interface: MMSMessagePart
Get the content-type of this message part.

Specified by:
getContentType in interface MMSMessagePart
Returns:
the content-type.


object XP, Inc. © 2000-2007. All rights reserved object XP