程序包 cn.taketoday.web
类 RequestContext.RequestContextHttpOutputMessage
java.lang.Object
cn.taketoday.web.RequestContext.RequestContextHttpOutputMessage
- 所有已实现的接口:
HttpMessage,HttpOutputMessage,ServerHttpResponse,Closeable,Flushable,AutoCloseable
- 封闭类:
- RequestContext
final class RequestContext.RequestContextHttpOutputMessage
extends Object
implements ServerHttpResponse
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明voidclose()Close this response, freeing any resources created.voidflush()Ensure that the headers and the content of the response are written out.getBody()Return the body of the message as an output stream.Return the headers of this message.voidsetStatusCode(HttpStatusCode status) Set the HTTP status code of the response.
-
构造器详细资料
-
RequestContextHttpOutputMessage
RequestContextHttpOutputMessage()
-
-
方法详细资料
-
setStatusCode
从接口复制的说明:ServerHttpResponseSet the HTTP status code of the response.- 指定者:
setStatusCode在接口中ServerHttpResponse- 参数:
status- the HTTP status as an HttpStatus enum value
-
flush
从接口复制的说明:ServerHttpResponseEnsure that the headers and the content of the response are written out.After the first flush, headers can no longer be changed. Only further content writing and content flushing is possible.
- 指定者:
flush在接口中Flushable- 指定者:
flush在接口中ServerHttpResponse- 抛出:
IOException
-
close
public void close()从接口复制的说明:ServerHttpResponseClose this response, freeing any resources created.- 指定者:
close在接口中AutoCloseable- 指定者:
close在接口中Closeable- 指定者:
close在接口中ServerHttpResponse
-
getBody
从接口复制的说明:HttpOutputMessageReturn the body of the message as an output stream.- 指定者:
getBody在接口中HttpOutputMessage- 返回:
- the output stream body (never
null) - 抛出:
IOException- in case of I/O errors
-
getHeaders
从接口复制的说明:HttpMessageReturn the headers of this message.- 指定者:
getHeaders在接口中HttpMessage- 返回:
- a corresponding HttpHeaders object (never
null)
-