38 |
package gnu.xml.dom; |
package gnu.xml.dom; |
39 |
|
|
40 |
import org.w3c.dom.CharacterData; |
import org.w3c.dom.CharacterData; |
41 |
import org.w3c.dom.Node; |
import org.w3c.dom.DOMException; |
|
import org.w3c.dom.NodeList; |
|
42 |
import org.w3c.dom.events.MutationEvent; |
import org.w3c.dom.events.MutationEvent; |
43 |
|
|
44 |
|
|
81 |
{ |
{ |
82 |
if (isReadonly()) |
if (isReadonly()) |
83 |
{ |
{ |
84 |
throw new DomEx(DomEx.NO_MODIFICATION_ALLOWED_ERR); |
throw new DomDOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR); |
85 |
} |
} |
86 |
String value = text + arg; |
String value = text + arg; |
87 |
mutating(value); |
mutating(value); |
97 |
{ |
{ |
98 |
if (isReadonly()) |
if (isReadonly()) |
99 |
{ |
{ |
100 |
throw new DomEx(DomEx.NO_MODIFICATION_ALLOWED_ERR); |
throw new DomDOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR); |
101 |
} |
} |
102 |
char[] raw = text.toCharArray(); |
char[] raw = text.toCharArray(); |
103 |
if (offset < 0 || count < 0 || offset > raw.length) |
if (offset < 0 || count < 0 || offset > raw.length) |
104 |
{ |
{ |
105 |
throw new DomEx(DomEx.INDEX_SIZE_ERR); |
throw new DomDOMException(DOMException.INDEX_SIZE_ERR); |
106 |
} |
} |
107 |
if ((offset + count) > raw.length) |
if ((offset + count) > raw.length) |
108 |
{ |
{ |
124 |
} |
} |
125 |
catch (IndexOutOfBoundsException x) |
catch (IndexOutOfBoundsException x) |
126 |
{ |
{ |
127 |
throw new DomEx(DomEx.INDEX_SIZE_ERR); |
throw new DomDOMException(DOMException.INDEX_SIZE_ERR); |
128 |
} |
} |
129 |
} |
} |
130 |
|
|
163 |
{ |
{ |
164 |
if (isReadonly()) |
if (isReadonly()) |
165 |
{ |
{ |
166 |
throw new DomEx(DomEx.NO_MODIFICATION_ALLOWED_ERR); |
throw new DomDOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR); |
167 |
} |
} |
168 |
char[] raw = text.toCharArray(); |
char[] raw = text.toCharArray(); |
169 |
char[] tmp = arg.toCharArray (); |
char[] tmp = arg.toCharArray (); |
181 |
} |
} |
182 |
catch (IndexOutOfBoundsException x) |
catch (IndexOutOfBoundsException x) |
183 |
{ |
{ |
184 |
throw new DomEx(DomEx.INDEX_SIZE_ERR); |
throw new DomDOMException(DOMException.INDEX_SIZE_ERR); |
185 |
} |
} |
186 |
} |
} |
187 |
|
|
194 |
{ |
{ |
195 |
if (readonly) |
if (readonly) |
196 |
{ |
{ |
197 |
throw new DomEx(DomEx.NO_MODIFICATION_ALLOWED_ERR); |
throw new DomDOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR); |
198 |
} |
} |
199 |
char[] raw = text.toCharArray(); |
char[] raw = text.toCharArray(); |
200 |
|
|
201 |
// deleteData |
// deleteData |
202 |
if (offset < 0 || count < 0 || offset > raw.length) |
if (offset < 0 || count < 0 || offset > raw.length) |
203 |
{ |
{ |
204 |
throw new DomEx(DomEx.INDEX_SIZE_ERR); |
throw new DomDOMException(DOMException.INDEX_SIZE_ERR); |
205 |
} |
} |
206 |
if ((offset + count) > raw.length) |
if ((offset + count) > raw.length) |
207 |
{ |
{ |
227 |
} |
} |
228 |
catch (IndexOutOfBoundsException x) |
catch (IndexOutOfBoundsException x) |
229 |
{ |
{ |
230 |
throw new DomEx(DomEx.INDEX_SIZE_ERR); |
throw new DomDOMException(DOMException.INDEX_SIZE_ERR); |
231 |
} |
} |
232 |
} |
} |
233 |
|
|
240 |
{ |
{ |
241 |
if (isReadonly()) |
if (isReadonly()) |
242 |
{ |
{ |
243 |
throw new DomEx (DomEx.NO_MODIFICATION_ALLOWED_ERR); |
throw new DomDOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR); |
244 |
} |
} |
245 |
if (value == null) |
if (value == null) |
246 |
{ |
{ |
275 |
{ |
{ |
276 |
return text.substring(offset); |
return text.substring(offset); |
277 |
} |
} |
278 |
throw new DomEx(DomEx.INDEX_SIZE_ERR); |
throw new DomDOMException(DOMException.INDEX_SIZE_ERR); |
279 |
} |
} |
280 |
} |
} |
281 |
|
|