public class Text extends Object
| Constructor and Description |
|---|
Text(MediaType type)
Constructor.
|
Text(MediaType type,
String content)
Constructor.
|
Text(String content)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
String |
getContent()
Returns the content.
|
MediaType |
getType()
Returns the content type.
|
void |
setContent(String content)
Sets the content.
|
void |
setType(MediaType type)
Sets the content type.
|
String |
toString() |
static void |
writeElement(XmlWriter writer,
Date date,
String namespace,
String localName)
Writes the current object as an XML element using the given SAX writer.
|
void |
writeElement(XmlWriter writer,
String localName)
Writes the current object as an XML element using the given SAX writer.
|
public Text(MediaType type)
type - The content type.public Text(MediaType type, String content)
type - The content type.content - The content.public Text(String content)
content - The content.public static void writeElement(XmlWriter writer, Date date, String namespace, String localName) throws SAXException
writer - The SAX writer.namespace - The element namespace URI.localName - The local name of the element.SAXExceptionpublic String getContent()
public MediaType getType()
public void setContent(String content)
content - The content.public void setType(MediaType type)
type - The content type.public void writeElement(XmlWriter writer, String localName) throws SAXException
writer - The SAX writer.localName - The local name of the element.SAXExceptionCopyright © 2005–2015. All rights reserved.