code: private void initializeScheme(String p_uriSpec) throws MalformedURIException
    {
  
      int uriSpecLen = p_uriSpec.length();
      int index = 0;
      String scheme = null;
      char testChar = '\0';
  
      while (index < uriSpecLen)
      {
        testChar = p_uriSpec.charAt(index);
  
        if (testChar == ':' || testChar == '/' || testChar == '?'
                || testChar == '#')
        {
          break;
        }
  
        index++;
      }
  
      scheme = p_uriSpec.substring(0, index);
  
      if (scheme.length() == 0)
      {
        throw new MalformedURIException(XMLMessages.createXMLMessage(XMLErrorResources.ER_NO_SCHEME_INURI, null)); //"No scheme found in URI.");
      }
      else
      {
        setScheme(scheme);
      }
    }
docs: Initialize the scheme for this URI from a URI string spec.
  
  @param p_uriSpec the URI specification (cannot be null)
  
  @throws MalformedURIException if URI does not have a conformant
  scheme