Class HttpUtils


  • public final class HttpUtils
    extends java.lang.Object
    Utils for handling http request/response
    • Field Detail

      • HEADER_ATTACHEMNT_FILENAME

        public static final java.lang.String HEADER_ATTACHEMNT_FILENAME
        See Also:
        Constant Field Values
    • Method Detail

      • writeFileToResponse

        public static void writeFileToResponse​(javax.servlet.http.HttpServletResponse response,
                                               FileContent fileContent,
                                               boolean attachment)
                                        throws java.io.IOException
        Throws:
        java.io.IOException
      • multipartToFileContent

        public static FileContent multipartToFileContent​(org.springframework.web.multipart.MultipartFile file)
                                                  throws java.io.IOException
        Throws:
        java.io.IOException