类 MockHttpOutputMessage
java.lang.Object
cn.taketoday.mock.http.MockHttpOutputMessage
- 所有已实现的接口:
cn.taketoday.http.HttpMessage,cn.taketoday.http.HttpOutputMessage
- 直接已知子类:
MockClientHttpRequest
Mock implementation of
HttpOutputMessage.- 从以下版本开始:
- 4.0
- 作者:
- Rossen Stoyanchev
-
字段概要
字段 -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明getBody()Return the body content.byte[]Return body content as a byte array.Return the body content interpreted as a UTF-8 string.getBodyAsString(Charset charset) Return the body content as a string.cn.taketoday.http.HttpHeadersReturn the headers.从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait从接口继承的方法 cn.taketoday.http.HttpOutputMessage
sendFile, sendFile, sendFile, setContentType, supportsZeroCopy
-
字段详细资料
-
headers
private final cn.taketoday.http.HttpHeaders headers -
body
-
-
构造器详细资料
-
MockHttpOutputMessage
public MockHttpOutputMessage()
-
-
方法详细资料
-
getHeaders
public cn.taketoday.http.HttpHeaders getHeaders()Return the headers.- 指定者:
getHeaders在接口中cn.taketoday.http.HttpMessage
-
getBody
Return the body content.- 指定者:
getBody在接口中cn.taketoday.http.HttpOutputMessage- 抛出:
IOException
-
getBodyAsBytes
public byte[] getBodyAsBytes()Return body content as a byte array. -
getBodyAsString
Return the body content interpreted as a UTF-8 string. -
getBodyAsString
Return the body content as a string.- 参数:
charset- the charset to use to turn the body content to a String
-