public class DownloadUtils extends Object
| 限定符和类型 | 字段和说明 |
|---|---|
static int |
cacheSize
The data cache size
|
| 构造器和说明 |
|---|
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 fileInputStream,
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 fileInputStream, javax.servlet.http.HttpServletResponse response)
downloadName - the download file name(Must include suffixes)contentType - the http servlet response content typefileInputStream - 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.