public class Content
extends java.lang.Object
Constructor and Description |
---|
Content()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
Reference |
getExternalRef()
Returns the reference to the external representation.
|
MediaType |
getExternalType()
Returns the expected media type of the external content.
|
Representation |
getInlineContent()
Returns the representation for inline content.
|
boolean |
isExternal()
Indicates if the content is available externally.
|
boolean |
isInline()
Indicates if the content is available inline.
|
boolean |
isToEncode()
Returns true if the content is to be encoded.
|
void |
setExternalRef(Reference externalRef)
Sets the reference to the external representation.
|
void |
setExternalType(MediaType externalType)
Sets the expected media type of the external content.
|
void |
setInlineContent(Representation inlineContent)
Sets the representation for inline content.
|
void |
setToEncode(boolean toEncode)
Indicates if the content is to be encoded.
|
void |
writeElement(XmlWriter writer)
Writes the current object as an XML element using the given SAX writer.
|
public Reference getExternalRef()
public MediaType getExternalType()
public Representation getInlineContent()
public boolean isExternal()
public boolean isInline()
public boolean isToEncode()
public void setExternalRef(Reference externalRef)
externalRef
- The reference to the external representation.public void setExternalType(MediaType externalType)
externalType
- The expected media type of the external content.public void setInlineContent(Representation inlineContent)
inlineContent
- The representation for inline content.public void setToEncode(boolean toEncode)
toEncode
- True if the content is to be encoded.public void writeElement(XmlWriter writer) throws org.xml.sax.SAXException
writer
- The SAX writer.org.xml.sax.SAXException
Copyright © 2005-2024 Restlet.