question: private void updateSegmentContent ( Segment segment , String content ) { final int lengthBefore = xml . length ; xml = insertBetween ( xml , segment . left , segment . right , content ) ; shiftSegments ( segment . left , xml . length - lengthBefore ) ; segment . right = segment . left + content . length ( ) - 1 ; }
target:  Inserts content bytes between left and right segment bounds and shifts segments on offset equal to difference between new and old source bytes length