code: public static boolean isWhitespace(String str) {
        if (str == null) {
            return false;
        }
        int sz = str.length();
        for (int i = 0; i < sz; i++) {
            if ((Character.isWhitespace(str.charAt(i)) == false)) {
                return false;
            }
        }
        return true;
    }
docs: <p>Checks if the String contains only whitespace.</p>
  
  <p><code>null</code> will return <code>false</code>.
  An empty String ("") will return <code>true</code>.</p>
  
  <pre>
  GosuStringUtil.isWhitespace(null)   = false
  GosuStringUtil.isWhitespace("")     = true
  GosuStringUtil.isWhitespace("  ")   = true
  GosuStringUtil.isWhitespace("abc")  = false
  GosuStringUtil.isWhitespace("ab2c") = false
  GosuStringUtil.isWhitespace("ab-c") = false
  </pre>
  
  @param str  the String to check, may be null
  @return <code>true</code> if only contains whitespace, and is non-null
  @since 2.0