code: private Set<RenditionMetadata> getRendtionsMatchingFileExtensions(String[] fileExtensions, MediaArgs mediaArgs) {
  
      // if no file extension restriction get all renditions
      Set<RenditionMetadata> allRenditions = getAvailableRenditions(mediaArgs);
      if (fileExtensions == null || fileExtensions.length == 0) {
        return allRenditions;
      }
  
      // otherwise return those with matching extensions
      Set<RenditionMetadata> matchingRenditions = new TreeSet<RenditionMetadata>();
      for (RenditionMetadata rendition : allRenditions) {
        for (String fileExtension : fileExtensions) {
          if (StringUtils.equalsIgnoreCase(fileExtension, rendition.getFileExtension())) {
            matchingRenditions.add(rendition);
            break;
          }
        }
      }
      return matchingRenditions;
    }
docs: Get all renditions that match the requested list of file extension.
  @param fileExtensions List of file extensions
  @return Matching renditions