code: public static boolean isWhiteSpace(String s)
    {
  
      if(null != s)
      {
        int n = s.length();
    
        for (int i = 0; i < n; i++)
        {
          if (!isWhiteSpace(s.charAt(i)))
            return false;
        }
      }
  
      return true;
    }
docs: Tell if the string is whitespace.
  
  @param s String to check as XML whitespace.
  @return True if characters in buffer are XML whitespace, false otherwise