/[classpath]/classpath/gnu/xml/dom/DomCharacterData.java
ViewVC logotype

Diff of /classpath/gnu/xml/dom/DomCharacterData.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1.2.1 by gnu_andrew, Sun Jan 16 15:15:09 2005 UTC revision 1.1.2.2 by gnu_andrew, Wed Feb 16 01:11:41 2005 UTC
# Line 38  exception statement from your version. * Line 38  exception statement from your version. *
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    
# Line 82  public abstract class DomCharacterData Line 81  public abstract class DomCharacterData
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);
# Line 98  public abstract class DomCharacterData Line 97  public abstract class DomCharacterData
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        {        {
# Line 125  public abstract class DomCharacterData Line 124  public abstract class DomCharacterData
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            
# Line 164  public abstract class DomCharacterData Line 163  public abstract class DomCharacterData
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 ();
# Line 182  public abstract class DomCharacterData Line 181  public abstract class DomCharacterData
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            
# Line 195  public abstract class DomCharacterData Line 194  public abstract class DomCharacterData
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        {        {
# Line 228  public abstract class DomCharacterData Line 227  public abstract class DomCharacterData
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            
# Line 241  public abstract class DomCharacterData Line 240  public abstract class DomCharacterData
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        {        {
# Line 276  public abstract class DomCharacterData Line 275  public abstract class DomCharacterData
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    

Legend:
Removed from v.1.1.2.1  
changed lines
  Added in v.1.1.2.2

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26