code: private boolean isNonspace(String str, char ch) throws RepositoryException
     {
        if (ch == '|')
        {
           throw new RepositoryException("Illegal absPath: \"" + str + "\": The path entry contains an illegal char: \"" + ch + "\"");
        }
  
        return !((ch == '\t') || (ch == '\n') || (ch == '\f') || (ch == '\r') || (ch == ' ') || (ch == '/')
           || (ch == ':') || (ch == '[') || (ch == ']') || (ch == '*'));
     }
docs: Some functions for JCRPath Validation