public static boolean isNullOrWhitespace(final String str){
  if (isNullOrEmpty(str)) {
    return true;
  }
  for (int i=0; i < str.length(); i++) {
    if (!Character.isWhitespace(str.charAt(i))) {
      return false;
    }
  }
  return true;
}

public static boolean isNullOrWhitespace ( final String str ) { if ( isNullOrEmpty ( str ) ) { return true ; } for ( int i = 0 ; i < str . length ( ) ; i ++ ) { if ( ! Character . isWhitespace ( str . charAt ( i ) ) ) { return false ; } } return true ; }
determines if the specified string is null or whitespace .
