code: public static String getFilename(@NotNull Rendition rendition) {
      boolean isOriginal = isOriginal(rendition);
      if (isOriginal) {
        return rendition.getAsset().getName();
      }
      else {
        return rendition.getName();
      }
    }
docs: Get file name of given rendition. If it is the original rendition get asset name as file name.
  @param rendition Rendition
  @return File extension or null if it could not be detected