private boolean modifyExifAndStorePhoto(
      UUID jobId, Photo photo, String url, String blindedPhotoId) throws IOException {
    try (InputStream inputStream = ConnectionProvider.getConnection(url).getInputStream()) {
      final byte[] bytes = IOUtils.toByteArray(inputStream);
      if (bytes.length == 0) {
        // We should not upload an empty photo and Google cannot handle it.
        return true;
      }

      if (null == photo.getCreatedTime()) {
        try (ByteArrayInputStream unmodifiedInputStream = new ByteArrayInputStream(bytes)) {
          store.create(jobId, blindedPhotoId, unmodifiedInputStream);
        }
        return false;
      }

      final ImageMetadata metadata = Imaging.getMetadata(bytes);
      final JpegImageMetadata jpegMetadata = (JpegImageMetadata) metadata;
      TiffOutputSet outputSet = null;
      if (null != jpegMetadata) {
        // note that exif might be null if no Exif metadata is found.
        final TiffImageMetadata exif = jpegMetadata.getExif();

        if (null != exif) {
          // TiffImageMetadata class is immutable (read-only).
          // TiffOutputSet class represents the Exif data to write.
          //
          // Usually, we want to update existing Exif metadata by
          // changing
          // the values of a few fields, or adding a field.
          // In these cases, it is easiest to use getOutputSet() to
          // start with a "copy" of the fields read from the image.
          outputSet = exif.getOutputSet();
        }
      }
      if (null == outputSet) {
        outputSet = new TiffOutputSet();
      }
      final TiffOutputDirectory exifDirectory = outputSet.getOrCreateExifDirectory();
      exifDirectory.removeField(ExifTagConstants.EXIF_TAG_DATE_TIME_ORIGINAL);
      exifDirectory.add(
          ExifTagConstants.EXIF_TAG_DATE_TIME_ORIGINAL,
          exifDateFormat.format(photo.getCreatedTime()));
      try (final ByteArrayOutputStream outputStream = new ByteArrayOutputStream(bytes.length)) {
        new ExifRewriter().updateExifMetadataLossless(bytes, outputStream, outputSet);
        try (ByteArrayInputStream modifiedInputStream =
            new ByteArrayInputStream(outputStream.toByteArray())) {
          store.create(jobId, blindedPhotoId, modifiedInputStream);
        }
      }
    } catch (ImageReadException | ImageWriteException e) {
      monitor.severe(
          () ->
              String.format("There was an issue when modifying the exif data of %s", photo.getId()),
          e);
      return true;
    }
    return false;
  }
This method fetches the image from the specified URL, modifies the EXIF to include the created
date, and then stores the modified photo via the store on the local filesystem.

@param jobId          Id for the current transfer
@param photo          The photo model returned from the API
@param url            The source url for the photo
@param blindedPhotoId The blinded Id we will share with the importer
@return True if we should skip this photo because it is empty
@throws IOException If there is an issue with modifying the exif data
extensions/data-transfer/portability-data-transfer-facebook/src/main/java/org/datatransferproject/transfer/facebook/photos/FacebookPhotosExporter.java