public interface RsfHttpResponseData
| 限定符和类型 | 方法和说明 |
|---|---|
void |
addHeader(String name,
String value)
Adds a response header with the given name and value.
|
boolean |
containsHeader(String name)
Returns a boolean indicating whether the named response header has already been set.
|
String |
getHeader(String name)
Gets the value of the response header with the given name.
|
Collection<String> |
getHeaderNames()
Gets the names of the headers of this response.
|
Collection<String> |
getHeaders(String name)
Gets the values of the response header with the given name.
|
InputStream |
getInputStream()
Returns a
InputStream suitable for reading binary data in the response. |
int |
getStatus()
Gets the current status code of this response.
|
String |
getStatusMessage() |
void |
setHeader(String name,
String value)
Sets a response header with the given name and value.
|
InputStream getInputStream() throws IOException
InputStream suitable for reading binary data in the response.
The servlet container does not encode the binary data.InputStream for reading binary dataIOException - if an input or output exception occurredint getStatus()
boolean containsHeader(String name)
name - the header nametrue if the named response header has already been set; false otherwisevoid setHeader(String name, String value)
containsHeader method can be
used to test for the presence of a header before setting its
value.name - the name of the headervalue - the header value If it contains octet string,
it should be encoded according to RFC 2047
(http://www.ietf.org/rfc/rfc2047.txt)containsHeader(java.lang.String),
addHeader(java.lang.String, java.lang.String)void addHeader(String name, String value)
name - the name of the headervalue - the additional header value If it contains
octet string, it should be encoded
according to RFC 2047
(http://www.ietf.org/rfc/rfc2047.txt)setHeader(java.lang.String, java.lang.String)String getHeader(String name)
If a response header with the given name exists and contains multiple values, the value that was added first will be returned.
This method considers only response headers set or added via
setHeader(java.lang.String, java.lang.String), addHeader(java.lang.String, java.lang.String), respectively.
name - the name of the response header whose value to returnCollection<String> getHeaders(String name)
This method considers only response headers set or added via
setHeader(java.lang.String, java.lang.String), addHeader(java.lang.String, java.lang.String), respectively.
Any changes to the returned Collection must not
affect this HttpServletResponse.
name - the name of the response header whose values to returnCollection of the values
of the response header with the given nameCollection<String> getHeaderNames()
This method considers only response headers set or added via
setHeader(java.lang.String, java.lang.String), addHeader(java.lang.String, java.lang.String), respectively.
Any changes to the returned Collection must not
affect this HttpServletResponse.
Collection of the names
of the headers of this responseString getStatusMessage()
Copyright © 2020–2021. All rights reserved.