code: public static URIName nameConstraint(DerValue value) throws IOException {
          URI uri;
          String name = value.getIA5String();
          try {
              uri = new URI(name);
          } catch (URISyntaxException use) {
              throw new IOException("invalid URI name constraint:" + name, use);
          }
          if (uri.getScheme() == null) {
              String host = uri.getSchemeSpecificPart();
              try {
                  DNSName hostDNS;
                  if (host.charAt(0) == '.') {
                      hostDNS = new DNSName(host.substring(1));
                  } else {
                      hostDNS = new DNSName(host);
                  }
                  return new URIName(uri, host, hostDNS);
              } catch (IOException ioe) {
                  throw new IOException("invalid URI name constraint:" + name, ioe);
              }
          } else {
              throw new IOException("invalid URI name constraint (should not " +
                  "include scheme):" + name);
          }
      }
docs: Create the URIName object with the specified name constraint. URI
  name constraints syntax is different than SubjectAltNames, etc. See
  4.2.1.11 of RFC 3280.
  
  @param value the URI name constraint
  @throws IOException if name is not a proper URI name constraint