private boolean isUpToDate(@NotNull Url url, @NotNull File file, @NotNull String header) throws IOException {
    List<String> strings = file.exists() ? Files.readAllLines(file.toPath()) : ContainerUtil.emptyList();

    String currentTag = strings.size() > 0 ? strings.get(0) : null;
    if (currentTag == null) return false;

    String remoteTag = connect(url, HttpRequests.head(url.toExternalForm()),
                               r -> r.getConnection().getHeaderField(header));

    return currentTag.equals(remoteTag);
  }
private boolean isUpToDate(@NotNull Url url, @NotNull File file, @NotNull String header)