public class ResponseUtils extends Object
| 构造器和说明 |
|---|
ResponseUtils() |
| 限定符和类型 | 方法和说明 |
|---|---|
static javax.servlet.http.HttpServletResponse |
copy(javax.servlet.http.HttpServletResponse response)
复制响应
|
static javax.servlet.ServletOutputStream |
copyStream(javax.servlet.http.HttpServletResponse response)
复制响应
|
static void |
writeHtml(javax.servlet.http.HttpServletResponse response,
String content)
写入响应-HTML
|
static void |
writeJson(javax.servlet.http.HttpServletResponse response,
String content)
写入响应-JSON
|
static void |
writeJsonObject(javax.servlet.http.HttpServletResponse response,
Object content)
写入响应-JSON
|
static void |
writeJsonObject(javax.servlet.http.HttpServletResponse response,
ResponseResult result)
写入响应-JSON
|
static void |
writeText(javax.servlet.http.HttpServletResponse response,
String content)
写入响应-纯文本
|
public static javax.servlet.ServletOutputStream copyStream(javax.servlet.http.HttpServletResponse response)
throws IOException
response - 请求IOException - 读写异常public static javax.servlet.http.HttpServletResponse copy(javax.servlet.http.HttpServletResponse response)
throws IOException
response - 请求IOException - 读写异常public static void writeText(javax.servlet.http.HttpServletResponse response,
String content)
response - 响应content - 内容public static void writeHtml(javax.servlet.http.HttpServletResponse response,
String content)
response - 响应content - 内容public static void writeJson(javax.servlet.http.HttpServletResponse response,
String content)
response - 响应content - 内容public static void writeJsonObject(javax.servlet.http.HttpServletResponse response,
Object content)
response - 响应content - 内容public static void writeJsonObject(javax.servlet.http.HttpServletResponse response,
ResponseResult result)
response - 响应result - 实体内容Copyright © 2024. All rights reserved.