| 构造器和说明 |
|---|
HttpResponse() |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
addCookie(Cookie cookie) |
void |
addHeader(String key,
String value)
设置响应头
|
void |
downloadBytes(byte[] bytes,
String fileName) |
void |
downloadChunkFile(File file,
String fileName) |
void |
downloadChunkStream(InputStream inputStream,
String fileName) |
void |
downloadContinueFile(File file) |
void |
downloadContinueFile(File file,
String name) |
void |
downloadFile(File file) |
void |
downloadFile(File file,
String name) |
void |
downloadStream(InputStream inputStream,
String fileName) |
Set<io.netty.handler.codec.http.cookie.Cookie> |
getCookies() |
io.netty.channel.ChannelHandlerContext |
getCtx() |
HeadMap |
getHeaders() |
io.netty.handler.codec.http.HttpResponseStatus |
getHttpResponseStatus() |
HttpResponseFile |
getResponseFile() |
String |
getResult() |
SSeStream |
getSSeStream() |
SSeStream |
getSSeStream(Integer retryMilliseconds) |
boolean |
hasData() |
boolean |
isFile() |
boolean |
isUseCtx() |
void |
redirect(String url) |
void |
sendHtml(String html) |
void |
sendJson(Object object) |
void |
sendJsonString(String jsonStr) |
void |
sendTemplate(String htmlPath) |
void |
sendTemplate(String htmlPath,
Map<String,Object> obj) |
void |
sendText(String text) |
void |
setCtx(io.netty.channel.ChannelHandlerContext ctx) |
void |
setStatus(HttpResponseStatus httpResponseStatus) |
void |
setUseCtx(boolean p) |
public void downloadBytes(byte[] bytes,
String fileName)
downloadBytes 在接口中 Responsepublic void downloadFile(File file)
downloadFile 在接口中 Responsepublic void downloadFile(File file, String name)
downloadFile 在接口中 Responsepublic void downloadStream(InputStream inputStream, String fileName)
downloadStream 在接口中 Responsepublic void downloadChunkFile(File file, String fileName)
downloadChunkFile 在接口中 Responsepublic void downloadChunkStream(InputStream inputStream, String fileName)
downloadChunkStream 在接口中 Responsepublic void downloadContinueFile(File file)
downloadContinueFile 在接口中 Responsepublic void downloadContinueFile(File file, String name)
downloadContinueFile 在接口中 Responsepublic SSeStream getSSeStream()
getSSeStream 在接口中 Responsepublic SSeStream getSSeStream(Integer retryMilliseconds)
getSSeStream 在接口中 Responsepublic void sendJsonString(String jsonStr)
sendJsonString 在接口中 Responsepublic void setStatus(HttpResponseStatus httpResponseStatus)
public void sendTemplate(String htmlPath, Map<String,Object> obj)
sendTemplate 在接口中 Responsepublic void sendTemplate(String htmlPath)
sendTemplate 在接口中 Responsepublic io.netty.handler.codec.http.HttpResponseStatus getHttpResponseStatus()
public HttpResponseFile getResponseFile()
public void setUseCtx(boolean p)
public boolean isUseCtx()
public boolean isFile()
public String getResult()
public Set<io.netty.handler.codec.http.cookie.Cookie> getCookies()
public HeadMap getHeaders()
public io.netty.channel.ChannelHandlerContext getCtx()
public void setCtx(io.netty.channel.ChannelHandlerContext ctx)
Copyright © 2025. All rights reserved.