StringBuffer buf = cdata.getString(); buf.replace( offset, offset + count, arg); cdata.setLength(0); cdata.append(buf);
if(cdata == null) throw new DOMException(DOMException.DOMSTRING_SIZE_ERR, "string index out of bounds"); cdata.replace(offset, count, arg);
    public void replaceData( int offset, int count, String arg ) throws DOMException {        /*         *  if(offset < 0 || offset + count > cdata.length())         *  throw new DOMException(DOMException.INDEX_SIZE_ERR, "");         */        StringBuffer buf = cdata.getString();        buf.replace( offset, offset + count, arg);        cdata.setLength(0);        cdata.append(buf);    }