private final void appendContents(StringBuffer buf,CharacterIterator iterator){
  int index=iterator.getBeginIndex();
  int end=iterator.getEndIndex();
  while (index < end) {
    iterator.setIndex(index++);
    buf.append(iterator.current());
  }
}

private final void appendContents ( StringBuffer buf , CharacterIterator iterator ) { int index = iterator . getBeginIndex ( ) ; int end = iterator . getEndIndex ( ) ; while ( index < end ) { iterator . setIndex ( index ++ ) ; buf . append ( iterator . current ( ) ) ; } }
appends the contents of the characteriterator iterator into the stringbuffer buf .
