docs: private String readEc2MetadataUrl(URL url, int connectionTimeoutMs, int readTimeoutMs) throws IOException {
  
          if (url.getProtocol().equalsIgnoreCase("file")) {
              url = rewriteUrl(url);
              URLConnection urlConnection = url.openConnection();
              urlConnection.connect();
              try (BufferedReader in = new BufferedReader(
                  new InputStreamReader(urlConnection.getInputStream()))) {
                  return IOUtils.readText(in);
              }
          } else {
              URLConnection urlConnection = url.openConnection();
              HttpURLConnection uc = (HttpURLConnection) urlConnection;
  
              uc.setConnectTimeout(connectionTimeoutMs);
              uc.setReadTimeout(readTimeoutMs);
              uc.setRequestMethod("GET");
              uc.setDoOutput(true);
              int responseCode = uc.getResponseCode();
              try (BufferedReader in = new BufferedReader(
                  new InputStreamReader(uc.getInputStream()))) {
                  return IOUtils.readText(in);
              }
          }
      }