CharacterDataImplpublic abstract class CharacterDataImpl extends LeafNodeImpl implements CharacterDataProvides a straightforward implementation of the corresponding W3C DOM
interface. The class is used internally only, thus only notable members that
are not in the original interface are documented (the W3C docs are quite
extensive). Hope that's ok.
Some of the fields may have package visibility, so other classes belonging to
the DOM implementation can easily access them while maintaining the DOM tree
structure. |
Fields Summary |
---|
private StringBuffer | buffer |
Constructors Summary |
---|
CharacterDataImpl(DocumentImpl document, String data)
super(document);
setData(data);
|
Methods Summary |
---|
public void | appendData(java.lang.String arg)
buffer.append(arg);
| public void | deleteData(int offset, int count)
buffer.delete(offset, offset + count);
| public java.lang.String | getData()
return buffer.toString();
| public int | getLength()
return buffer.length();
| public java.lang.String | getNodeValue()
return getData();
| public void | insertData(int offset, java.lang.String arg)
try {
buffer.insert(offset, arg);
} catch (ArrayIndexOutOfBoundsException ex) {
throw new DOMException(DOMException.INDEX_SIZE_ERR, null);
}
| public void | replaceData(int offset, int count, java.lang.String arg)
try {
buffer.replace(offset, offset + count, arg);
} catch (ArrayIndexOutOfBoundsException ex) {
throw new DOMException(DOMException.INDEX_SIZE_ERR, null);
}
| public void | setData(java.lang.String data)
buffer = new StringBuffer(data);
| public java.lang.String | substringData(int offset, int count)
try {
return buffer.substring(offset, offset + count);
} catch (ArrayIndexOutOfBoundsException ex) {
throw new DOMException(DOMException.INDEX_SIZE_ERR, null);
}
|
|