public boolean contentEquals(StringBuffer strbuf){
synchronized (strbuf) {
    int size=strbuf.length();
    if (count != size) {
      return false;
    }
    return regionMatches(0,new String(0,size,strbuf.getValue()),0,size);
  }
}

public boolean contentEquals ( StringBuffer strbuf ) { synchronized ( strbuf ) { int size = strbuf . length ( ) ; if ( count != size ) { return false ; } return regionMatches ( 0 , new String ( 0 , size , strbuf . getValue ( ) ) , 0 , size ) ; } }
answers whether the characters in the stringbuffer strbuf are the same as those in this string .
