Class FileUtils
java.lang.Object
es.kukenan.smartfi.microservice.backoffice.utils.FileUtils
Files utilities.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voiddonwloadFile(File coreFile, javax.servlet.http.HttpServletResponse response) Send to response a specific file.static FilegetResponseFile(org.springframework.http.HttpHeaders headers, InternalProductApiRestTemplateFactory.InternalProductApiRestTemplate restTemplate, URI uri) Get file from HTTP response.
-
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.
-