code: private static boolean isURIString(String p_uric)
    {
  
      if (p_uric == null)
      {
        return false;
      }
  
      int end = p_uric.length();
      char testChar = '\0';
  
      for (int i = 0; i < end; i++)
      {
        testChar = p_uric.charAt(i);
  
        if (testChar == '%')
        {
          if (i + 2 >= end ||!isHex(p_uric.charAt(i + 1))
                  ||!isHex(p_uric.charAt(i + 2)))
          {
            return false;
          }
          else
          {
            i += 2;
  
            continue;
          }
        }
  
        if (isReservedCharacter(testChar) || isUnreservedCharacter(testChar))
        {
          continue;
        }
        else
        {
          return false;
        }
      }
  
      return true;
    }
docs: Determine whether a given string contains only URI characters (also
  called "uric" in RFC 2396). uric consist of all reserved
  characters, unreserved characters and escaped characters.
  
  
  @param p_uric URI string
  @return true if the string is comprised of uric, false otherwise