java.lang.Object
es.kukenan.smartfi.microservice.backoffice.utils.FileUtils

public class FileUtils extends Object
Files utilities.
  • Constructor Details

    • FileUtils

      public FileUtils()
  • Method Details

    • donwloadFile

      public static void donwloadFile(File coreFile, javax.servlet.http.HttpServletResponse response) throws IOException
      Send to response a specific file.
      Parameters:
      coreFile - file from core.
      response - Http response.
      Throws:
      IOException - IOException while downloading a file.
    • getResponseFile

      public static File getResponseFile(org.springframework.http.HttpHeaders headers, InternalProductApiRestTemplateFactory.InternalProductApiRestTemplate restTemplate, URI uri)
      Get file from HTTP response.
      Parameters:
      headers - Http headers.
      restTemplate - rest template to send.
      uri - uri to send
      Returns:
      file received.