public class DownloadUtils extends Object
Download utils
| 构造器和说明 |
|---|
DownloadUtils() |
| 限定符和类型 | 方法和说明 |
|---|---|
static void |
download(String downloadName,
ResponseContentType contentType,
ByteArrayOutputStream outputStream,
javax.servlet.http.HttpServletResponse response)
Download file
|
static void |
download(String downloadName,
ResponseContentType contentType,
FileInputStream is,
javax.servlet.http.HttpServletResponse response)
Download file
|
static void |
download(String downloadName,
ResponseContentType contentType,
String filePath,
javax.servlet.http.HttpServletResponse response)
Download file
|
public static void download(String downloadName, ResponseContentType contentType, ByteArrayOutputStream outputStream, javax.servlet.http.HttpServletResponse response)
downloadName - the download file name(Must include suffixes)contentType - the http servlet response content typeoutputStream - the byte array output stream of the fileresponse - the http servlet responsepublic static void download(String downloadName, ResponseContentType contentType, FileInputStream is, javax.servlet.http.HttpServletResponse response)
downloadName - the download file name(Must include suffixes)contentType - the http servlet response content typeis - the file input streamresponse - the http servlet responsepublic static void download(String downloadName, ResponseContentType contentType, String filePath, javax.servlet.http.HttpServletResponse response)
downloadName - the download file name(Must include suffixes)contentType - the http servlet response content typefilePath - the path of the fileresponse - the http servlet responseCopyright © 2019. All rights reserved.