code: private static void decorateContentNode(final Node dsNode, final Node descNode, final Collection<URI> checksums)
          throws RepositoryException {
  
          if (dsNode == null) {
              LOGGER.warn("{} node appears to be null!", JCR_CONTENT);
              return;
          }
  
          if (dsNode.hasProperty(JCR_DATA)) {
              final Property dataProperty = dsNode.getProperty(JCR_DATA);
              final Binary binary = (Binary) dataProperty.getBinary();
              final String dsChecksum = binary.getHexHash();
  
              checksums.add(ContentDigest.asURI(SHA1.algorithm, dsChecksum));
  
              final String[] checksumArray = new String[checksums.size()];
              checksums.stream().map(Object::toString).collect(Collectors.toSet()).toArray(checksumArray);
  
              if (descNode != null) {
                  descNode.setProperty(CONTENT_DIGEST, checksumArray);
                  descNode.setProperty(CONTENT_SIZE, dataProperty.getLength());
              }
  
              LOGGER.debug("Decorated data property at path: {}", dataProperty.getPath());
          }
      }
docs: Add necessary information to node
  @param dsNode The target binary node to add information to
  @param descNode The description node associated with the binary node
  @param checksums The checksum information
  @throws RepositoryException on error