docs: private static String getContentEncoding(URL url) throws IOException {
          URLConnection urlConnection = url.openConnection();
          String encoding = urlConnection.getContentEncoding();
          try {
              IOGroovyMethods.closeQuietly(urlConnection.getInputStream());
          } catch (IOException ignore) {
              // For compatibility, ignore exceptions from getInputStream() call
          }
          return encoding;
      }