updateState(download, Downloading);
Long contentLength = download.getFile().getExpectedChecksum() != null ? download.getFile().getExpectedChecksum().getContentLength() : null;
log.info(format("Downloading %d bytes from %s with ETag %s", contentLength, download.getUrl(), download.getETag()));
get = new Get(download.getUrl());
if (new Validator(download).existTargets() && download.getETag() != null)
get.setIfNoneMatch(download.getETag());
InputStream inputStream = get.executeAsStream();
log.info(format("Download from %s returned with status code %s", download.getUrl(), get.getStatusCode()));
if (get.isSuccessful() && inputStream != null) {