|
|||||||||
上一个类 下一个类 | 框架 无框架 | ||||||||
摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 |
java.lang.Object org.jboss.netty.handler.codec.http.DefaultHttpMessage
public class DefaultHttpMessage
The default HttpMessage
implementation.
方法摘要 | |
---|---|
void |
addHeader(java.lang.String name,
java.lang.Object value)
Adds a new header with the specified name and value. |
void |
clearHeaders()
Removes all headers from this message. |
boolean |
containsHeader(java.lang.String name)
Returns true if and only if there is a header with the specified
header name. |
ChannelBuffer |
getContent()
Returns the content of this message. |
long |
getContentLength()
已过时。 |
long |
getContentLength(long defaultValue)
已过时。 |
java.lang.String |
getHeader(java.lang.String name)
Returns the header value with the specified header name. |
java.util.Set<java.lang.String> |
getHeaderNames()
Returns the Set of all header names that this message contains. |
java.util.List<java.util.Map.Entry<java.lang.String,java.lang.String>> |
getHeaders()
Returns the all header names and values that this message contains. |
java.util.List<java.lang.String> |
getHeaders(java.lang.String name)
Returns the header values with the specified header name. |
HttpVersion |
getProtocolVersion()
Returns the protocol version of this message. |
boolean |
isChunked()
Returns true if and only if this message does not have any
content but the HttpChunk s, which is generated by
HttpMessageDecoder consecutively, contain the actual content. |
boolean |
isKeepAlive()
已过时。 |
void |
removeHeader(java.lang.String name)
Removes the header with the specified name. |
void |
setChunked(boolean chunked)
Sets if this message does not have any content but the HttpChunk s, which is generated by HttpMessageDecoder
consecutively, contain the actual content. |
void |
setContent(ChannelBuffer content)
Sets the content of this message. |
void |
setHeader(java.lang.String name,
java.lang.Iterable<?> values)
Sets a new header with the specified name and values. |
void |
setHeader(java.lang.String name,
java.lang.Object value)
Sets a new header with the specified name and value. |
void |
setProtocolVersion(HttpVersion version)
Sets the protocol version of this message. |
java.lang.String |
toString()
|
从类 java.lang.Object 继承的方法 |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
方法详细信息 |
---|
public void addHeader(java.lang.String name, java.lang.Object value)
HttpMessage
复制的描述
HttpMessage
中的 addHeader
public void setHeader(java.lang.String name, java.lang.Object value)
HttpMessage
复制的描述
HttpMessage
中的 setHeader
public void setHeader(java.lang.String name, java.lang.Iterable<?> values)
HttpMessage
复制的描述
HttpMessage
中的 setHeader
public void removeHeader(java.lang.String name)
HttpMessage
复制的描述
HttpMessage
中的 removeHeader
@Deprecated public long getContentLength()
HttpMessage
中的 getContentLength
@Deprecated public long getContentLength(long defaultValue)
HttpMessage
中的 getContentLength
public boolean isChunked()
HttpMessage
复制的描述true
if and only if this message does not have any
content but the HttpChunk
s, which is generated by
HttpMessageDecoder
consecutively, contain the actual content.
Please note that this method will keep returning true
if the
"Transfer-Encoding"
of this message is "chunked"
, even if
you attempt to override this property by calling HttpMessage.setChunked(boolean)
with false
.
HttpMessage
中的 isChunked
public void setChunked(boolean chunked)
HttpMessage
复制的描述HttpChunk
s, which is generated by HttpMessageDecoder
consecutively, contain the actual content.
If this method is called with true
, the content of this message
becomes ChannelBuffers.EMPTY_BUFFER
.
Even if this method is called with false
, HttpMessage.isChunked()
will keep returning true
if the "Transfer-Encoding"
of
this message is "chunked"
.
HttpMessage
中的 setChunked
@Deprecated public boolean isKeepAlive()
HttpMessage
中的 isKeepAlive
public void clearHeaders()
HttpMessage
复制的描述
HttpMessage
中的 clearHeaders
public void setContent(ChannelBuffer content)
HttpMessage
复制的描述null
is specified,
the content of this message will be set to ChannelBuffers.EMPTY_BUFFER
.
HttpMessage
中的 setContent
public java.lang.String getHeader(java.lang.String name)
HttpMessage
复制的描述
HttpMessage
中的 getHeader
null
if there is no such headerpublic java.util.List<java.lang.String> getHeaders(java.lang.String name)
HttpMessage
复制的描述
HttpMessage
中的 getHeaders
List
of header values. An empty list if there is no
such header.public java.util.List<java.util.Map.Entry<java.lang.String,java.lang.String>> getHeaders()
HttpMessage
复制的描述
HttpMessage
中的 getHeaders
List
of the header name-value pairs. An empty list
if there is no header in this message.public boolean containsHeader(java.lang.String name)
HttpMessage
复制的描述true
if and only if there is a header with the specified
header name.
HttpMessage
中的 containsHeader
public java.util.Set<java.lang.String> getHeaderNames()
HttpMessage
复制的描述Set
of all header names that this message contains.
HttpMessage
中的 getHeaderNames
public HttpVersion getProtocolVersion()
HttpMessage
复制的描述
HttpMessage
中的 getProtocolVersion
public void setProtocolVersion(HttpVersion version)
HttpMessage
复制的描述
HttpMessage
中的 setProtocolVersion
public ChannelBuffer getContent()
HttpMessage
复制的描述HttpMessage.isChunked()
returns true
, an
ChannelBuffers.EMPTY_BUFFER
is returned.
HttpMessage
中的 getContent
public java.lang.String toString()
java.lang.Object
中的 toString
|
|||||||||
上一个类 下一个类 | 框架 无框架 | ||||||||
摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 |