private void replace(final char[] revA,final char[] revB,final DiffBlock curA,final DiffBlock curB) throws UnsupportedEncodingException {
  String text=copy(revB,curB.getRevBStart(),curB.getRevBEnd());
  DiffPart action=new DiffPart(DiffAction.REPLACE);
  action.setStart(version.length());
  codecData.checkBlocksizeS(version.length());
  action.setLength(curA.getRevAEnd() - curA.getRevAStart());
  codecData.checkBlocksizeE(action.getLength());
  action.setText(text);
  codecData.checkBlocksizeL(text.getBytes(WIKIPEDIA_ENCODING).length);
  diff.add(action);
  version.append(text);
}

private void replace ( final char [ ] revA , final char [ ] revB , final DiffBlock curA , final DiffBlock curB ) throws UnsupportedEncodingException { String text = copy ( revB , curB . getRevBStart ( ) , curB . getRevBEnd ( ) ) ; DiffPart action = new DiffPart ( DiffAction . REPLACE ) ; action . setStart ( version . length ( ) ) ; codecData . checkBlocksizeS ( version . length ( ) ) ; action . setLength ( curA . getRevAEnd ( ) - curA . getRevAStart ( ) ) ; codecData . checkBlocksizeE ( action . getLength ( ) ) ; action . setText ( text ) ; codecData . checkBlocksizeL ( text . getBytes ( WIKIPEDIA_ENCODING ) . length ) ; diff . add ( action ) ; version . append ( text ) ; }
creates a replace operation .
