public class DOMCharacterDataImpl extends DOMNodeImpl implements org.w3c.dom.CharacterData
adaptee| Modifier | Constructor and Description |
|---|---|
protected |
DOMCharacterDataImpl(Node adaptee) |
| Modifier and Type | Method and Description |
|---|---|
void |
appendData(java.lang.String arg)
Append the string to the end of the character data of the node.
|
void |
deleteData(int offset,
int count)
Remove a range of 16-bit units from the node.
|
java.lang.String |
getData()
The character data of the node that implements this interface.
|
int |
getLength()
The number of 16-bit units that are available through
data
and the substringData method below. |
void |
insertData(int offset,
java.lang.String arg)
Insert a string at the specified 16-bit unit offset.
|
void |
replaceData(int offset,
int count,
java.lang.String arg)
Replace the characters starting at the specified 16-bit unit offset
with the specified string.
|
void |
setData(java.lang.String data) |
java.lang.String |
substringData(int offset,
int count)
Extracts a range of data from the node.
|
appendChild, cloneNode, getAttributes, getChildNodes, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getNodeName, getNodeType, getNodeValue, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, hasAttributes, hasChildNodes, insertBefore, isSupported, normalize, removeChild, replaceChild, setNodeValue, setPrefix, supportsclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitappendChild, cloneNode, getAttributes, getChildNodes, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getNodeName, getNodeType, getNodeValue, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, hasAttributes, hasChildNodes, insertBefore, isSupported, normalize, removeChild, replaceChild, setNodeValue, setPrefixprotected DOMCharacterDataImpl(Node adaptee)
public java.lang.String getData()
throws org.w3c.dom.DOMException
org.w3c.dom.CharacterDataCharacterData node. However,
implementation limits may mean that the entirety of a node's data may
not fit into a single DOMString. In such cases, the user
may call substringData to retrieve the data in
appropriately sized pieces.getData in interface org.w3c.dom.CharacterDataorg.w3c.dom.DOMException - NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.CharacterData.getData()public void setData(java.lang.String data)
throws org.w3c.dom.DOMException
setData in interface org.w3c.dom.CharacterDataorg.w3c.dom.DOMExceptionCharacterData.setData(java.lang.String)public int getLength()
org.w3c.dom.CharacterDatadata
and the substringData method below. This may have the
value zero, i.e., CharacterData nodes may be empty.getLength in interface org.w3c.dom.CharacterDataCharacterData.getLength()public java.lang.String substringData(int offset,
int count)
throws org.w3c.dom.DOMException
org.w3c.dom.CharacterDatasubstringData in interface org.w3c.dom.CharacterDataoffset and
count exceeds the length, then all 16-bit
units to the end of the data are returned.org.w3c.dom.DOMException - INDEX_SIZE_ERR: Raised if the specified offset is
negative or greater than the number of 16-bit units in
data, or if the specified count is
negative.
DOMString.CharacterData.substringData(int, int)public void appendData(java.lang.String arg)
throws org.w3c.dom.DOMException
org.w3c.dom.CharacterDatadata provides access to the concatenation of
data and the DOMString specified.appendData in interface org.w3c.dom.CharacterDataorg.w3c.dom.DOMException - NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.CharacterData.appendData(java.lang.String)public void insertData(int offset,
java.lang.String arg)
throws org.w3c.dom.DOMException
org.w3c.dom.CharacterDatainsertData in interface org.w3c.dom.CharacterDataorg.w3c.dom.DOMException - INDEX_SIZE_ERR: Raised if the specified offset is
negative or greater than the number of 16-bit units in
data.
CharacterData.insertData(int, java.lang.String)public void deleteData(int offset,
int count)
throws org.w3c.dom.DOMException
org.w3c.dom.CharacterDatadata and length reflect the change.deleteData in interface org.w3c.dom.CharacterDataorg.w3c.dom.DOMException - INDEX_SIZE_ERR: Raised if the specified offset is
negative or greater than the number of 16-bit units in
data, or if the specified count is
negative.
CharacterData.deleteData(int, int)public void replaceData(int offset,
int count,
java.lang.String arg)
throws org.w3c.dom.DOMException
org.w3c.dom.CharacterDatareplaceData in interface org.w3c.dom.CharacterDataorg.w3c.dom.DOMException - INDEX_SIZE_ERR: Raised if the specified offset is
negative or greater than the number of 16-bit units in
data, or if the specified count is
negative.
CharacterData.replaceData(int, int, java.lang.String)