Smack

org.jivesoftware.smackx
Class XHTMLManager

java.lang.Object
  extended byorg.jivesoftware.smackx.XHTMLManager

public class XHTMLManager
extends Object

Manages XHTML formatted texts within messages. A XHTMLManager provides a high level access to get and set XHTML bodies to messages, enable and disable XHTML support and check if remote XMPP clients support XHTML.

Author:
Gaston Dombiak

Constructor Summary
XHTMLManager()
           
 
Method Summary
static void addBody(Message message, String body)
          Adds an XHTML body to the message.
static Iterator getBodies(Message message)
          Returns an Iterator for the XHTML bodies in the message.
static boolean isXHTMLMessage(Message message)
          Returns true if the message contains an XHTML extension.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XHTMLManager

public XHTMLManager()
Method Detail

getBodies

public static Iterator getBodies(Message message)
Returns an Iterator for the XHTML bodies in the message. Returns null if the message does not contain an XHTML extension.

Parameters:
message - an XHTML message
Returns:
an Iterator for the bodies in the message or null if none.

addBody

public static void addBody(Message message,
                           String body)
Adds an XHTML body to the message.

Parameters:
message - the message that will receive the XHTML body
body - the string to add as an XHTML body to the message

isXHTMLMessage

public static boolean isXHTMLMessage(Message message)
Returns true if the message contains an XHTML extension.

Parameters:
message - the message to check if contains an XHTML extentsion or not
Returns:
a boolean indicating whether the message is an XHTML message

Smack

Copyright © 2003 Jive Software.