| 构造器和说明 |
|---|
ResponseFile() |
| 限定符和类型 | 方法和说明 |
|---|---|
static javax.servlet.http.HttpServletResponse |
csvResponse(javax.servlet.http.HttpServletResponse response,
String title)
设置csv下载头
|
static javax.servlet.http.HttpServletResponse |
customResponse(javax.servlet.http.HttpServletResponse response,
String contentType,
String filename)
自定义文件下载头
|
static javax.servlet.http.HttpServletResponse |
customResponse(javax.servlet.http.HttpServletResponse response,
String contentType,
String title,
String fileFormat)
自定义文件下载头
|
static javax.servlet.http.HttpServletResponse |
fileResponse(javax.servlet.http.HttpServletResponse response,
File file)
自定义文件下载头
|
static javax.servlet.http.HttpServletResponse |
jsonResponse(javax.servlet.http.HttpServletResponse response,
String title)
设置json下载头
|
static javax.servlet.http.HttpServletResponse |
xlsxResponse(javax.servlet.http.HttpServletResponse response,
String title)
设置xlsx下载头
ps: 有同学反应使用swagger 会导致各种问题,请直接用浏览器或者用postman
|
static javax.servlet.http.HttpServletResponse |
zipResponse(javax.servlet.http.HttpServletResponse response,
String title)
设置zip下载头
|
public static javax.servlet.http.HttpServletResponse xlsxResponse(javax.servlet.http.HttpServletResponse response,
String title)
throws UnsupportedEncodingException
UnsupportedEncodingException - UnsupportedEncodingExceptionpublic static javax.servlet.http.HttpServletResponse jsonResponse(javax.servlet.http.HttpServletResponse response,
String title)
throws UnsupportedEncodingException
UnsupportedEncodingException - UnsupportedEncodingExceptionpublic static javax.servlet.http.HttpServletResponse zipResponse(javax.servlet.http.HttpServletResponse response,
String title)
throws UnsupportedEncodingException
UnsupportedEncodingException - UnsupportedEncodingExceptionpublic static javax.servlet.http.HttpServletResponse csvResponse(javax.servlet.http.HttpServletResponse response,
String title)
throws UnsupportedEncodingException
UnsupportedEncodingException - UnsupportedEncodingExceptionpublic static javax.servlet.http.HttpServletResponse fileResponse(javax.servlet.http.HttpServletResponse response,
File file)
throws IOException
UnsupportedEncodingException - UnsupportedEncodingExceptionIOExceptionpublic static javax.servlet.http.HttpServletResponse customResponse(javax.servlet.http.HttpServletResponse response,
String contentType,
String title,
String fileFormat)
throws UnsupportedEncodingException
UnsupportedEncodingException - UnsupportedEncodingExceptionpublic static javax.servlet.http.HttpServletResponse customResponse(javax.servlet.http.HttpServletResponse response,
String contentType,
String filename)
throws UnsupportedEncodingException
UnsupportedEncodingException - UnsupportedEncodingExceptionCopyright © 2024 tan. All rights reserved.