public static final class AbstractMessage.Body extends Object
<body/> element.
The
<body/>element contains human-readable XML character data that specifies the textual contents of the message; this child element is normally included but is OPTIONAL.There are no attributes defined for the
<body/>element, with the exception of the 'xml:lang' attribute. Multiple instances of the<body/>element MAY be included in a message stanza for the purpose of providing alternate versions of the same body, but only if each instance possesses an 'xml:lang' attribute with a distinct language value.
| Constructor and Description |
|---|
Body(String text)
Constructs a default body.
|
Body(String text,
String language)
Constructs a body with a language attribute.
|
| Modifier and Type | Method and Description |
|---|---|
String |
getLanguage()
Gets the language.
|
String |
getText()
Gets the text.
|
void |
setLanguage(String language)
Deprecated.
Use constructor.
|
void |
setText(String text)
Deprecated.
Use constructor.
|
String |
toString() |
public Body(String text)
text - The text.public String getLanguage()
@Deprecated public void setLanguage(String language)
language - The language.public String getText()
@Deprecated public void setText(String text)
text - The text.Copyright © 2014–2015 XMPP.rocks. All rights reserved.