question: public void replaceData ( int offset , int count , String data ) throws DOMException { CoreDocumentImpl ownerDocument = ownerDocument ( ) ; if ( ownerDocument . errorChecking && isReadOnly ( ) ) { String msg = DOMMessageFormatter . formatMessage ( DOMMessageFormatter . DOM_DOMAIN , "NO_MODIFICATION_ALLOWED_ERR" , null ) ; throw new DOMException ( DOMException . NO_MODIFICATION_ALLOWED_ERR , msg ) ; } if ( needsSyncData ( ) ) { synchronizeData ( ) ; } ownerDocument . replacingData ( this ) ; String oldvalue = this . data ; internalDeleteData ( offset , count , true ) ; internalInsertData ( offset , data , true ) ; ownerDocument . replacedCharacterData ( this , oldvalue , this . data ) ; }
target:  Replace a series of characters at the specified (zero-based) offset with a new string, NOT necessarily of the same length. Convenience method, equivalent to a delete followed by an insert. Throws a DOMException if the specified offset is beyond the end of the existing data.