Class FileDownloadApi


  • public class FileDownloadApi
    extends Object
    • Constructor Summary

      Constructors 
      Constructor Description
      FileDownloadApi()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static org.json.JSONObject downloadAndReturnJSONObject​(com.adobe.pdfservices.operation.internal.InternalExecutionContext context, String location)
      This method get the multipart response and saves the json output in a JSON Object
      static <T> void downloadAndSave​(com.adobe.pdfservices.operation.internal.InternalExecutionContext context, String location, String destinationPath, Class<T> responseType)
      This method downloads the file from the given location and saves it at the given destination path
      static void downloadAndSaveJson​(com.adobe.pdfservices.operation.internal.InternalExecutionContext context, String location, String destinationPath)
      This method get the multipart response and saves the json output in a file
      static <T> List<String> downloadAndSaveMultiple​(com.adobe.pdfservices.operation.internal.InternalExecutionContext context, String location, String targetFileExtension, Class<T> responseType)
      This method downloads multiple files from the given location and returns the list of temporary destination paths of the downloaded files.
    • Constructor Detail

      • FileDownloadApi

        public FileDownloadApi()
    • Method Detail

      • downloadAndSave

        public static <T> void downloadAndSave​(com.adobe.pdfservices.operation.internal.InternalExecutionContext context,
                                               String location,
                                               String destinationPath,
                                               Class<T> responseType)
                                        throws IOException
        This method downloads the file from the given location and saves it at the given destination path
        Throws:
        IOException
      • downloadAndSaveMultiple

        public static <T> List<String> downloadAndSaveMultiple​(com.adobe.pdfservices.operation.internal.InternalExecutionContext context,
                                                               String location,
                                                               String targetFileExtension,
                                                               Class<T> responseType)
                                                        throws IOException
        This method downloads multiple files from the given location and returns the list of temporary destination paths of the downloaded files.
        Throws:
        IOException
      • downloadAndSaveJson

        public static void downloadAndSaveJson​(com.adobe.pdfservices.operation.internal.InternalExecutionContext context,
                                               String location,
                                               String destinationPath)
        This method get the multipart response and saves the json output in a file
      • downloadAndReturnJSONObject

        public static org.json.JSONObject downloadAndReturnJSONObject​(com.adobe.pdfservices.operation.internal.InternalExecutionContext context,
                                                                      String location)
        This method get the multipart response and saves the json output in a JSON Object