throw new DomEx(DomEx.NO_MODIFICATION_ALLOWED_ERR);
throw new DomDOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR);
  public void replaceData(int offset, int count, String arg)  {    if (readonly)      {        throw new DomEx(DomEx.NO_MODIFICATION_ALLOWED_ERR);      }    char[] raw = text.toCharArray();        // deleteData    if (offset < 0 || count < 0 || offset > raw.length)      {        throw new DomEx(DomEx.INDEX_SIZE_ERR);      }    if ((offset + count) > raw.length)      {        count = raw.length - offset;      }    try      {        char[] buf = new char[raw.length - count];        System.arraycopy(raw, 0, buf, 0, offset);        System.arraycopy(raw, offset + count, buf, offset,                         raw.length - (offset + count));                // insertData        char[] tmp = arg.toCharArray ();        char[] buf2 = new char[buf.length + tmp.length];        System.arraycopy(raw, 0, buf, 0, offset);        System.arraycopy(tmp, 0, buf, offset, tmp.length);        System.arraycopy(raw, offset, buf, offset + tmp.length,                         raw.length - offset);        String value = new String(buf);        mutating(value);        text = value;      }    catch (IndexOutOfBoundsException x)      {        throw new DomEx(DomEx.INDEX_SIZE_ERR);      }  }