Package org.qubership.atp.tdm.utils
Class HttpUtils
java.lang.Object
org.qubership.atp.tdm.utils.HttpUtils
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic org.springframework.http.ResponseEntity<org.springframework.core.io.InputStreamResource> buildFileResponseEntity(File file, String contentType) Building response entity containing file for download to user.
-
Constructor Details
-
HttpUtils
public HttpUtils()
-
-
Method Details
-
buildFileResponseEntity
public static org.springframework.http.ResponseEntity<org.springframework.core.io.InputStreamResource> buildFileResponseEntity(File file, String contentType) throws FileNotFoundException Building response entity containing file for download to user.- Parameters:
file- - formed file.contentType- - type of file.- Returns:
- - response entity.
- Throws:
FileNotFoundException- -if there is no such file.
-