/[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 by mark, Thu Dec 23 22:38:43 2004 UTC revision 1.2 by dog, Thu Feb 10 17:21:25 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.DOMException;
42  import org.w3c.dom.Node;  import org.w3c.dom.Node;
43  import org.w3c.dom.NodeList;  import org.w3c.dom.NodeList;
44  import org.w3c.dom.events.MutationEvent;  import org.w3c.dom.events.MutationEvent;
# Line 82  public abstract class DomCharacterData Line 83  public abstract class DomCharacterData
83    {    {
84      if (isReadonly())      if (isReadonly())
85        {        {
86        throw new DomEx(DomEx.NO_MODIFICATION_ALLOWED_ERR);          throw new DomDOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR);
87        }        }
88      String value = text + arg;      String value = text + arg;
89      mutating(value);      mutating(value);
# Line 98  public abstract class DomCharacterData Line 99  public abstract class DomCharacterData
99    {    {
100      if (isReadonly())      if (isReadonly())
101        {        {
102          throw new DomEx(DomEx.NO_MODIFICATION_ALLOWED_ERR);          throw new DomDOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR);
103        }        }
104      char[] raw = text.toCharArray();      char[] raw = text.toCharArray();
105      if (offset < 0 || count < 0 || offset > raw.length)      if (offset < 0 || count < 0 || offset > raw.length)
106        {        {
107          throw new DomEx(DomEx.INDEX_SIZE_ERR);          throw new DomDOMException(DOMException.INDEX_SIZE_ERR);
108        }        }
109      if ((offset + count) > raw.length)      if ((offset + count) > raw.length)
110        {        {
# Line 125  public abstract class DomCharacterData Line 126  public abstract class DomCharacterData
126        }        }
127      catch (IndexOutOfBoundsException x)      catch (IndexOutOfBoundsException x)
128        {        {
129          throw new DomEx(DomEx.INDEX_SIZE_ERR);          throw new DomDOMException(DOMException.INDEX_SIZE_ERR);
130        }        }
131    }    }
132            
# Line 164  public abstract class DomCharacterData Line 165  public abstract class DomCharacterData
165    {    {
166      if (isReadonly())      if (isReadonly())
167        {        {
168        throw new DomEx(DomEx.NO_MODIFICATION_ALLOWED_ERR);        throw new DomDOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR);
169        }        }
170      char[] raw = text.toCharArray();      char[] raw = text.toCharArray();
171      char[] tmp = arg.toCharArray ();      char[] tmp = arg.toCharArray ();
# Line 182  public abstract class DomCharacterData Line 183  public abstract class DomCharacterData
183        }        }
184      catch (IndexOutOfBoundsException x)      catch (IndexOutOfBoundsException x)
185        {        {
186          throw new DomEx(DomEx.INDEX_SIZE_ERR);          throw new DomDOMException(DOMException.INDEX_SIZE_ERR);
187        }        }
188    }    }
189            
# Line 195  public abstract class DomCharacterData Line 196  public abstract class DomCharacterData
196    {    {
197      if (readonly)      if (readonly)
198        {        {
199          throw new DomEx(DomEx.NO_MODIFICATION_ALLOWED_ERR);          throw new DomDOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR);
200        }        }
201      char[] raw = text.toCharArray();      char[] raw = text.toCharArray();
202            
203      // deleteData      // deleteData
204      if (offset < 0 || count < 0 || offset > raw.length)      if (offset < 0 || count < 0 || offset > raw.length)
205        {        {
206          throw new DomEx(DomEx.INDEX_SIZE_ERR);          throw new DomDOMException(DOMException.INDEX_SIZE_ERR);
207        }        }
208      if ((offset + count) > raw.length)      if ((offset + count) > raw.length)
209        {        {
# Line 228  public abstract class DomCharacterData Line 229  public abstract class DomCharacterData
229        }        }
230      catch (IndexOutOfBoundsException x)      catch (IndexOutOfBoundsException x)
231        {        {
232          throw new DomEx(DomEx.INDEX_SIZE_ERR);          throw new DomDOMException(DOMException.INDEX_SIZE_ERR);
233        }        }
234    }    }
235            
# Line 241  public abstract class DomCharacterData Line 242  public abstract class DomCharacterData
242    {    {
243      if (isReadonly())      if (isReadonly())
244        {        {
245          throw new DomEx (DomEx.NO_MODIFICATION_ALLOWED_ERR);          throw new DomDOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR);
246        }        }
247      if (value == null)      if (value == null)
248        {        {
# Line 276  public abstract class DomCharacterData Line 277  public abstract class DomCharacterData
277            {            {
278              return text.substring(offset);              return text.substring(offset);
279            }            }
280          throw new DomEx(DomEx.INDEX_SIZE_ERR);          throw new DomDOMException(DOMException.INDEX_SIZE_ERR);
281        }        }
282    }    }
283    

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

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