Helius
2021-06-16 5728be2af515b2200e782aa201ca5d4d67d9ea47
1
2
3
4
5
6
7
8
9
10
11
12
13
14
package com.ibeetl.admin.core.util;
 
import java.io.IOException;
import java.io.OutputStream;
 
import javax.servlet.http.HttpServletResponse;
 
public class FileDownloadUtil {
    public static OutputStream getDownLoad(HttpServletResponse response,String fileName) throws IOException {
         response.setContentType("text/html; charset = UTF-8");  
         response.setHeader("Content-Disposition", "attachment; filename="+fileName);  
         return response.getOutputStream();
    }
}