public class DefaultLastHttpContent extends DefaultHttpContent implements LastHttpContent
LastHttpContent
implementation.EMPTY_LAST_CONTENT
构造器和说明 |
---|
DefaultLastHttpContent()
Create a new empty, last HTTP content message.
|
DefaultLastHttpContent(ByteBuf content)
Create a new last HTTP content message with the given contents.
|
DefaultLastHttpContent(ByteBuf content,
boolean validateHeaders)
已过时。
Prefer the
DefaultLastHttpContent(ByteBuf) constructor instead, to always have header
validation enabled. |
DefaultLastHttpContent(ByteBuf content,
HttpHeaders trailingHeaders)
Create a new last HTTP content message with the given contents, and trailing headers.
|
DefaultLastHttpContent(ByteBuf content,
HttpHeadersFactory trailersFactory)
Create a new last HTTP content message with the given contents, and trailing headers from the given factory.
|
限定符和类型 | 方法和说明 |
---|---|
LastHttpContent |
copy()
Creates a deep copy of this
ByteBufHolder . |
LastHttpContent |
duplicate()
Duplicates this
ByteBufHolder . |
LastHttpContent |
replace(ByteBuf content)
Returns a new
ByteBufHolder which contains the specified content . |
LastHttpContent |
retain()
Increases the reference count by
1 . |
LastHttpContent |
retain(int increment)
Increases the reference count by the specified
increment . |
LastHttpContent |
retainedDuplicate()
Duplicates this
ByteBufHolder . |
java.lang.String |
toString() |
LastHttpContent |
touch()
Records the current access location of this object for debugging purposes.
|
LastHttpContent |
touch(java.lang.Object hint)
Records the current access location of this object with an additional arbitrary information for debugging
purposes.
|
HttpHeaders |
trailingHeaders() |
content, refCnt, release, release
decoderResult, equals, getDecoderResult, hashCode, setDecoderResult
getDecoderResult
decoderResult, setDecoderResult
content
refCnt, release, release
public DefaultLastHttpContent()
public DefaultLastHttpContent(ByteBuf content)
@Deprecated public DefaultLastHttpContent(ByteBuf content, boolean validateHeaders)
DefaultLastHttpContent(ByteBuf)
constructor instead, to always have header
validation enabled.
Warning! Setting validateHeaders
to false
will mean that Netty won't
validate & protect against user-supplied header values that are malicious.
This can leave your server implementation vulnerable to
CWE-113: Improper Neutralization of CRLF Sequences in HTTP Headers ('HTTP Response Splitting')
.
When disabling this validation, it is the responsibility of the caller to ensure that the values supplied
do not contain a non-url-escaped carriage return (CR) and/or line feed (LF) characters.
public DefaultLastHttpContent(ByteBuf content, HttpHeadersFactory trailersFactory)
public DefaultLastHttpContent(ByteBuf content, HttpHeaders trailingHeaders)
public LastHttpContent copy()
ByteBufHolder
ByteBufHolder
.copy
在接口中 ByteBufHolder
copy
在接口中 HttpContent
copy
在接口中 LastHttpContent
copy
在类中 DefaultHttpContent
public LastHttpContent duplicate()
ByteBufHolder
ByteBufHolder
. Be aware that this will not automatically call ByteBufHolder.retain()
.duplicate
在接口中 ByteBufHolder
duplicate
在接口中 HttpContent
duplicate
在接口中 LastHttpContent
duplicate
在类中 DefaultHttpContent
public LastHttpContent retainedDuplicate()
ByteBufHolder
ByteBufHolder
. This method returns a retained duplicate unlike ByteBufHolder.duplicate()
.retainedDuplicate
在接口中 ByteBufHolder
retainedDuplicate
在接口中 HttpContent
retainedDuplicate
在接口中 LastHttpContent
retainedDuplicate
在类中 DefaultHttpContent
ByteBuf.retainedDuplicate()
public LastHttpContent replace(ByteBuf content)
ByteBufHolder
ByteBufHolder
which contains the specified content
.replace
在接口中 ByteBufHolder
replace
在接口中 HttpContent
replace
在接口中 LastHttpContent
replace
在类中 DefaultHttpContent
public LastHttpContent retain(int increment)
ReferenceCounted
increment
.retain
在接口中 ByteBufHolder
retain
在接口中 HttpContent
retain
在接口中 LastHttpContent
retain
在接口中 ReferenceCounted
retain
在类中 DefaultHttpContent
public LastHttpContent retain()
ReferenceCounted
1
.retain
在接口中 ByteBufHolder
retain
在接口中 HttpContent
retain
在接口中 LastHttpContent
retain
在接口中 ReferenceCounted
retain
在类中 DefaultHttpContent
public LastHttpContent touch()
ReferenceCounted
ResourceLeakDetector
. This method is a shortcut to touch(null)
.touch
在接口中 ByteBufHolder
touch
在接口中 HttpContent
touch
在接口中 LastHttpContent
touch
在接口中 ReferenceCounted
touch
在类中 DefaultHttpContent
public LastHttpContent touch(java.lang.Object hint)
ReferenceCounted
ResourceLeakDetector
.touch
在接口中 ByteBufHolder
touch
在接口中 HttpContent
touch
在接口中 LastHttpContent
touch
在接口中 ReferenceCounted
touch
在类中 DefaultHttpContent
public HttpHeaders trailingHeaders()
trailingHeaders
在接口中 LastHttpContent
public java.lang.String toString()
toString
在类中 DefaultHttpContent