private static @NotNull String toAbsoluteUrl(@NotNull String downloadUrl,
                                               @NotNull String host) throws IOException {
    try {
      return new URI(downloadUrl).isAbsolute() ?
             downloadUrl :
             new URL(new URL(host), downloadUrl).toExternalForm();
    }
    catch (URISyntaxException e) {
      throw new IOException(e);
    }
  }
private static @NotNull String toAbsoluteUrl(@NotNull String downloadUrl,
                                               @NotNull String host)