286N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 286N/A * This code is free software; you can redistribute it and/or modify it 286N/A * under the terms of the GNU General Public License version 2 only, as 286N/A * published by the Free Software Foundation. Oracle designates this 286N/A * particular file as subject to the "Classpath" exception as provided 286N/A * by Oracle in the LICENSE file that accompanied this code. 286N/A * This code is distributed in the hope that it will be useful, but WITHOUT 286N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 286N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 286N/A * version 2 for more details (a copy is included in the LICENSE file that 286N/A * accompanied this code). 286N/A * You should have received a copy of the GNU General Public License version 286N/A * 2 along with this work; if not, write to the Free Software Foundation, 286N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 286N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 286N/A * or visit www.oracle.com if you need additional information or have any 286N/A * This file is available under and governed by the GNU General Public 286N/A * License version 2 only, as published by the Free Software Foundation. 286N/A * However, the following notice accompanied the original version of this 286N/A * file and, per its terms, should not be removed: 286N/A * Copyright (c) 2004 World Wide Web Consortium, 286N/A * (Massachusetts Institute of Technology, European Research Consortium for 286N/A * Informatics and Mathematics, Keio University). All Rights Reserved. This 286N/A * work is distributed under the W3C(r) Software License [1] in the hope that 286N/A * it will be useful, but WITHOUT ANY WARRANTY; without even the implied 286N/A * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 286N/A * The <code>CharacterData</code> interface extends Node with a set of 286N/A * attributes and methods for accessing character data in the DOM. For 286N/A * clarity this set is defined here rather than on each object that uses 286N/A * these attributes and methods. No DOM objects correspond directly to 286N/A * <code>CharacterData</code>, though <code>Text</code> and others do 286N/A * inherit the interface from it. All <code>offsets</code> in this interface 286N/A * start from <code>0</code>. 286N/A * <p>As explained in the <code>DOMString</code> interface, text strings in 286N/A * the DOM are represented in UTF-16, i.e. as a sequence of 16-bit units. In 286N/A * the following, the term 16-bit units is used whenever necessary to 286N/A * indicate that indexing on CharacterData is done in 16-bit units. 286N/A * The character data of the node that implements this interface. The DOM 286N/A * implementation may not put arbitrary limits on the amount of data 286N/A * that may be stored in a <code>CharacterData</code> node. However, 286N/A * implementation limits may mean that the entirety of a node's data may 286N/A * not fit into a single <code>DOMString</code>. In such cases, the user 286N/A * may call <code>substringData</code> to retrieve the data in 286N/A * appropriately sized pieces. 286N/A * @exception DOMException 286N/A * DOMSTRING_SIZE_ERR: Raised when it would return more characters than 286N/A * fit in a <code>DOMString</code> variable on the implementation 286N/A * The character data of the node that implements this interface. The DOM 286N/A * implementation may not put arbitrary limits on the amount of data 286N/A * that may be stored in a <code>CharacterData</code> node. However, 286N/A * implementation limits may mean that the entirety of a node's data may 286N/A * not fit into a single <code>DOMString</code>. In such cases, the user 286N/A * may call <code>substringData</code> to retrieve the data in 286N/A * appropriately sized pieces. 286N/A * @exception DOMException 286N/A * NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly. 286N/A * The number of 16-bit units that are available through <code>data</code> 286N/A * and the <code>substringData</code> method below. This may have the 286N/A * value zero, i.e., <code>CharacterData</code> nodes may be empty. 286N/A * Extracts a range of data from the node. 286N/A * @param offset Start offset of substring to extract. 286N/A * @param count The number of 16-bit units to extract. 286N/A * @return The specified substring. If the sum of <code>offset</code> and 286N/A * <code>count</code> exceeds the <code>length</code>, then all 16-bit 286N/A * units to the end of the data are returned. 286N/A * @exception DOMException 286N/A * INDEX_SIZE_ERR: Raised if the specified <code>offset</code> is 286N/A * negative or greater than the number of 16-bit units in 286N/A * <code>data</code>, or if the specified <code>count</code> is 286N/A * <br>DOMSTRING_SIZE_ERR: Raised if the specified range of text does 286N/A * not fit into a <code>DOMString</code>. 286N/A * Append the string to the end of the character data of the node. Upon 286N/A * success, <code>data</code> provides access to the concatenation of 286N/A * <code>data</code> and the <code>DOMString</code> specified. 286N/A * @param arg The <code>DOMString</code> to append. 286N/A * @exception DOMException 286N/A * NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly. 286N/A * Insert a string at the specified 16-bit unit offset. 286N/A * @param offset The character offset at which to insert. 286N/A * @param arg The <code>DOMString</code> to insert. 286N/A * @exception DOMException 286N/A * INDEX_SIZE_ERR: Raised if the specified <code>offset</code> is 286N/A * negative or greater than the number of 16-bit units in 286N/A * <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly. 286N/A * Remove a range of 16-bit units from the node. Upon success, 286N/A * <code>data</code> and <code>length</code> reflect the change. 286N/A * @param offset The offset from which to start removing. 286N/A * @param count The number of 16-bit units to delete. If the sum of 286N/A * <code>offset</code> and <code>count</code> exceeds 286N/A * <code>length</code> then all 16-bit units from <code>offset</code> 286N/A * to the end of the data are deleted. 286N/A * @exception DOMException 286N/A * INDEX_SIZE_ERR: Raised if the specified <code>offset</code> is 286N/A * negative or greater than the number of 16-bit units in 286N/A * <code>data</code>, or if the specified <code>count</code> is 286N/A * <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly. 286N/A * Replace the characters starting at the specified 16-bit unit offset 286N/A * with the specified string. 286N/A * @param offset The offset from which to start replacing. 286N/A * @param count The number of 16-bit units to replace. If the sum of 286N/A * <code>offset</code> and <code>count</code> exceeds 286N/A * <code>length</code>, then all 16-bit units to the end of the data 286N/A * are replaced; (i.e., the effect is the same as a <code>remove</code> 286N/A * method call with the same range, followed by an <code>append</code> 286N/A * @param arg The <code>DOMString</code> with which the range must be 286N/A * @exception DOMException 286N/A * INDEX_SIZE_ERR: Raised if the specified <code>offset</code> is 286N/A * negative or greater than the number of 16-bit units in 286N/A * <code>data</code>, or if the specified <code>count</code> is 286N/A * <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.