void internalDeleteData(int offset,int count,boolean replace) throws DOMException {
  CoreDocumentImpl ownerDocument=ownerDocument();
  if (ownerDocument.errorChecking) {
    if (isReadOnly()) {
      String msg=DOMMessageFormatter.formatMessage(DOMMessageFormatter.DOM_DOMAIN,"NO_MODIFICATION_ALLOWED_ERR",null);
      throw new DOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR,msg);
    }
    if (count < 0) {
      String msg=DOMMessageFormatter.formatMessage(DOMMessageFormatter.DOM_DOMAIN,"INDEX_SIZE_ERR",null);
      throw new DOMException(DOMException.INDEX_SIZE_ERR,msg);
    }
  }
  if (needsSyncData()) {
    synchronizeData();
  }
  int tailLength=Math.max(data.length() - count - offset,0);
  try {
    String value=data.substring(0,offset) + (tailLength > 0 ? data.substring(offset + count,offset + count + tailLength) : "");
    setNodeValueInternal(value,replace);
    ownerDocument.deletedText(this,offset,count);
  }
 catch (  StringIndexOutOfBoundsException e) {
    String msg=DOMMessageFormatter.formatMessage(DOMMessageFormatter.DOM_DOMAIN,"INDEX_SIZE_ERR",null);
    throw new DOMException(DOMException.INDEX_SIZE_ERR,msg);
  }
}

void internalDeleteData ( int offset , int count , boolean replace ) throws DOMException { CoreDocumentImpl ownerDocument = ownerDocument ( ) ; if ( ownerDocument . errorChecking ) { if ( isReadOnly ( ) ) { String msg = DOMMessageFormatter . formatMessage ( DOMMessageFormatter . DOM_DOMAIN , "NO_MODIFICATION_ALLOWED_ERR" , null ) ; throw new DOMException ( DOMException . NO_MODIFICATION_ALLOWED_ERR , msg ) ; } if ( count < 0 ) { String msg = DOMMessageFormatter . formatMessage ( DOMMessageFormatter . DOM_DOMAIN , "INDEX_SIZE_ERR" , null ) ; throw new DOMException ( DOMException . INDEX_SIZE_ERR , msg ) ; } } if ( needsSyncData ( ) ) { synchronizeData ( ) ; } int tailLength = Math . max ( data . length ( ) - count - offset , 0 ) ; try { String value = data . substring ( 0 , offset ) + ( tailLength > 0 ? data . substring ( offset + count , offset + count + tailLength ) : "" ) ; setNodeValueInternal ( value , replace ) ; ownerDocument . deletedText ( this , offset , count ) ; } catch ( StringIndexOutOfBoundsException e ) { String msg = DOMMessageFormatter . formatMessage ( DOMMessageFormatter . DOM_DOMAIN , "INDEX_SIZE_ERR" , null ) ; throw new DOMException ( DOMException . INDEX_SIZE_ERR , msg ) ; } }
non - dom internal : within dom actions , we sometimes need to be able to control which mutation events are spawned . this version of the deletedata operation allows us to do so . it is not intended for use by application programs .
