code: private static void checkSchemeConsistency(URI u) throws IOException {
      String scheme = u.getScheme();
      // the URI should have a proper scheme
      if(scheme == null) {
        throw new IOException("Undefined scheme for " + u);
      }
    }
docs: Checks the consistency of a URI, in particular if the scheme
  is specified
  @param u URI whose consistency is being checked.