com.objectxp.mms.message.smil
Class Text

java.lang.Object
  extended by com.objectxp.mms.message.smil.Element
      extended by com.objectxp.mms.message.smil.Media
          extended by com.objectxp.mms.message.smil.Text
All Implemented Interfaces:
MMSMessagePart, java.io.Serializable

public class Text
extends Media

This class represents a SMIL "text" element.

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
 
Constructor Summary
Text(byte[] content, java.lang.String name)
          Construct a new Text Element.
Text(byte[] content, java.lang.String name, java.lang.String mimeType)
          Construct a new Text element.
Text(java.io.InputStream src, java.lang.String name, java.lang.String mimeType)
          Construct a new Text element.
Text(java.lang.String text)
          Construct a new Text Element.
 
Method Summary
 
Methods inherited from class com.objectxp.mms.message.smil.Media
addAttribute, getCharset, getContent, getContentLocation, getContentType, getMimeType, setCharset, 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
 

Constructor Detail

Text

public Text(java.lang.String text)
Construct a new Text Element. The MIME type will be set to "text/plain". jSMS uses the plattform default character encoding to convert the String into a byte array.

Parameters:
text - the text element.

Text

public Text(byte[] content,
            java.lang.String name)
Construct a new Text Element. The name of the text element will be used to determine the MIME type of the image.

Parameters:
content - the text data
name - the name of the text element

Text

public Text(byte[] content,
            java.lang.String name,
            java.lang.String mimeType)
Construct a new Text element.

Parameters:
content - the text data
name - the name of the text element (e.g. 'hello.html')
mimeType - the MIME type of the element (e.g. 'text/html')

Text

public Text(java.io.InputStream src,
            java.lang.String name,
            java.lang.String mimeType)
     throws java.io.IOException
Construct a new Text element. The text data will be read from a InputStream.

Parameters:
src - a input stream providing the text data
name - the name of the text element (e.g. 'hello.html')
mimeType - the MIME type of the element (e.g. 'text/html'). If null, "text/plain" will be used.
Throws:
java.io.IOException - if an I/O error occurs


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