class BlobChecker implements RegistryEndpointProvider<Optional<BlobDescriptor>> {

  @Override
  public Optional<BlobDescriptor> handleResponse(Response response) throws RegistryErrorException {
    long contentLength = response.getContentLength();
    if (contentLength < 0) {
      throw new RegistryErrorExceptionBuilder(getActionDescription())
          .addReason("Did not receive Content-Length header")
          .build();
    }

    return Optional.of(new BlobDescriptor(contentLength, blobDigest));
  }

    BlobChecker(
      RegistryEndpointRequestProperties registryEndpointRequestProperties,
      DescriptorDigest blobDigest);

}