public static boolean isWhiteSpace(StringBuffer buf){
  int n=buf.length();
  for (int i=0; i < n; i++) {
    if (!isWhiteSpace(buf.charAt(i)))     return false;
  }
  return true;
}

public static boolean isWhiteSpace ( StringBuffer buf ) { int n = buf . length ( ) ; for ( int i = 0 ; i < n ; i ++ ) { if ( ! isWhiteSpace ( buf . charAt ( i ) ) ) return false ; } return true ; }
tell if the string is whitespace .
