code: public static String getHost(URI uri) throws IOException {
      String host = uri.getHost();
      if (host != null) {
        return host;
      }
      host = uri.toString();
      int sInd = host.indexOf("//") + 2;
      host = host.substring(sInd);
      int eInd = host.indexOf("/");
      if (eInd != -1) {
        host = host.substring(0,eInd);
      }
      host = URLDecoder.decode(host, StandardCharsets.UTF_8.toString());
      return host;
    }
docs: Extract host name from the URI
  
  @param uri object store uri
  @return host name
  @throws IOException if error