code: protected void applyTimestamps(ContentStream content, File localFile) {
          FileTime createTime =
              convertDateToFileTime(content.getDateCreated());
          FileTime lastAccessTime =
              convertDateToFileTime(content.getDateLastAccessed());
          FileTime lastModTime =
              convertDateToFileTime(content.getDateLastModified());
  
          BasicFileAttributeView fileAttributeView =
              Files.getFileAttributeView(localFile.toPath(),
                                         BasicFileAttributeView.class,
                                         LinkOption.NOFOLLOW_LINKS);
          // If any time value is null, that value is left unchanged
          try {
              fileAttributeView.setTimes(lastModTime, lastAccessTime, createTime);
          } catch (IOException e) {
              logger.error("Error setting timestamps for local file " +
                           localFile.getAbsolutePath() + ": " + e.getMessage(),
                           e);
          }
      }
docs: /*
  Applies timestamps which are found in the content item's properties
  to the retrieved file