public class Text
extends java.lang.Object
Constructor and Description |
---|
Text(MediaType type)
Constructor.
|
Text(MediaType type,
java.lang.String content)
Constructor.
|
Text(java.lang.String content)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getContent()
Returns the content.
|
MediaType |
getType()
Returns the content type.
|
void |
setContent(java.lang.String content)
Sets the content.
|
void |
setType(MediaType type)
Sets the content type.
|
java.lang.String |
toString() |
static void |
writeElement(XmlWriter writer,
java.util.Date date,
java.lang.String namespace,
java.lang.String localName)
Writes the current object as an XML element using the given SAX writer.
|
void |
writeElement(XmlWriter writer,
java.lang.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, java.lang.String content)
type
- The content type.content
- The content.public Text(java.lang.String content)
content
- The content.public static void writeElement(XmlWriter writer, java.util.Date date, java.lang.String namespace, java.lang.String localName) throws org.xml.sax.SAXException
writer
- The SAX writer.namespace
- The element namespace URI.localName
- The local name of the element.org.xml.sax.SAXException
public java.lang.String getContent()
public MediaType getType()
public void setContent(java.lang.String content)
content
- The content.public void setType(MediaType type)
type
- The content type.public java.lang.String toString()
toString
in class java.lang.Object
public void writeElement(XmlWriter writer, java.lang.String localName) throws org.xml.sax.SAXException
writer
- The SAX writer.localName
- The local name of the element.org.xml.sax.SAXException
Copyright © 2005-2020 Restlet.