@UnstableApi public final class DefaultHttp2DataFrame extends AbstractHttp2StreamFrame implements Http2DataFrame
Http2DataFrame implementation.| 构造器和说明 |
|---|
DefaultHttp2DataFrame(boolean endStream)
Equivalent to
new DefaultHttp2DataFrame(Unpooled.EMPTY_BUFFER, endStream). |
DefaultHttp2DataFrame(ByteBuf content)
Equivalent to
new DefaultHttp2DataFrame(content, false). |
DefaultHttp2DataFrame(ByteBuf content,
boolean endStream)
Equivalent to
new DefaultHttp2DataFrame(content, endStream, 0). |
DefaultHttp2DataFrame(ByteBuf content,
boolean endStream,
int padding)
Construct a new data message.
|
| 限定符和类型 | 方法和说明 |
|---|---|
ByteBuf |
content()
Payload of DATA frame.
|
DefaultHttp2DataFrame |
copy()
Creates a deep copy of this
ByteBufHolder. |
DefaultHttp2DataFrame |
duplicate()
Duplicates this
ByteBufHolder. |
boolean |
equals(java.lang.Object o)
Returns
true if o has equal stream to this object. |
int |
hashCode() |
int |
initialFlowControlledBytes()
Returns the number of bytes that are flow-controlled initially, so even if the
Http2DataFrame.content() is consumed
this will not change. |
boolean |
isEndStream()
Returns
true if the END_STREAM flag is set. |
java.lang.String |
name()
Returns the name of the HTTP/2 frame e.g.
|
int |
padding()
Frame padding to use.
|
int |
refCnt()
Returns the reference count of this object.
|
boolean |
release()
Decreases the reference count by
1 and deallocates this object if the reference count reaches at
0. |
boolean |
release(int decrement)
Decreases the reference count by the specified
decrement and deallocates this object if the reference
count reaches at 0. |
DefaultHttp2DataFrame |
replace(ByteBuf content)
Returns a new
ByteBufHolder which contains the specified content. |
DefaultHttp2DataFrame |
retain()
Increases the reference count by
1. |
DefaultHttp2DataFrame |
retain(int increment)
Increases the reference count by the specified
increment. |
DefaultHttp2DataFrame |
retainedDuplicate()
Duplicates this
ByteBufHolder. |
DefaultHttp2DataFrame |
stream(Http2FrameStream stream)
Set the
Http2FrameStream object for this frame. |
java.lang.String |
toString() |
DefaultHttp2DataFrame |
touch()
Records the current access location of this object for debugging purposes.
|
DefaultHttp2DataFrame |
touch(java.lang.Object hint)
Records the current access location of this object with an additional arbitrary information for debugging
purposes.
|
streamstreampublic DefaultHttp2DataFrame(ByteBuf content)
new DefaultHttp2DataFrame(content, false).content - non-null payloadpublic DefaultHttp2DataFrame(boolean endStream)
new DefaultHttp2DataFrame(Unpooled.EMPTY_BUFFER, endStream).endStream - whether this data should terminate the streampublic DefaultHttp2DataFrame(ByteBuf content, boolean endStream)
new DefaultHttp2DataFrame(content, endStream, 0).content - non-null payloadendStream - whether this data should terminate the streampublic DefaultHttp2DataFrame(ByteBuf content, boolean endStream, int padding)
content - non-null payloadendStream - whether this data should terminate the streampadding - additional bytes that should be added to obscure the true content size. Must be between 0 and
256 (inclusive).public DefaultHttp2DataFrame stream(Http2FrameStream stream)
Http2StreamFrameHttp2FrameStream object for this frame.stream 在接口中 Http2StreamFramestream 在类中 AbstractHttp2StreamFramepublic java.lang.String name()
Http2Framename 在接口中 Http2Framepublic boolean isEndStream()
Http2DataFrametrue if the END_STREAM flag is set.isEndStream 在接口中 Http2DataFramepublic int padding()
Http2DataFramepadding 在接口中 Http2DataFramepublic ByteBuf content()
Http2DataFramenull.content 在接口中 ByteBufHoldercontent 在接口中 Http2DataFramepublic int initialFlowControlledBytes()
Http2DataFrameHttp2DataFrame.content() is consumed
this will not change.initialFlowControlledBytes 在接口中 Http2DataFramepublic DefaultHttp2DataFrame copy()
ByteBufHolderByteBufHolder.copy 在接口中 ByteBufHoldercopy 在接口中 Http2DataFramepublic DefaultHttp2DataFrame duplicate()
ByteBufHolderByteBufHolder. Be aware that this will not automatically call ByteBufHolder.retain().duplicate 在接口中 ByteBufHolderduplicate 在接口中 Http2DataFramepublic DefaultHttp2DataFrame retainedDuplicate()
ByteBufHolderByteBufHolder. This method returns a retained duplicate unlike ByteBufHolder.duplicate().retainedDuplicate 在接口中 ByteBufHolderretainedDuplicate 在接口中 Http2DataFrameByteBuf.retainedDuplicate()public DefaultHttp2DataFrame replace(ByteBuf content)
ByteBufHolderByteBufHolder which contains the specified content.replace 在接口中 ByteBufHolderreplace 在接口中 Http2DataFramepublic int refCnt()
ReferenceCounted0, it means this object has been deallocated.refCnt 在接口中 ReferenceCountedpublic boolean release()
ReferenceCounted1 and deallocates this object if the reference count reaches at
0.release 在接口中 ReferenceCountedtrue if and only if the reference count became 0 and this object has been deallocatedpublic boolean release(int decrement)
ReferenceCounteddecrement and deallocates this object if the reference
count reaches at 0.release 在接口中 ReferenceCountedtrue if and only if the reference count became 0 and this object has been deallocatedpublic DefaultHttp2DataFrame retain()
ReferenceCounted1.retain 在接口中 ByteBufHolderretain 在接口中 Http2DataFrameretain 在接口中 ReferenceCountedpublic DefaultHttp2DataFrame retain(int increment)
ReferenceCountedincrement.retain 在接口中 ByteBufHolderretain 在接口中 Http2DataFrameretain 在接口中 ReferenceCountedpublic java.lang.String toString()
toString 在类中 java.lang.Objectpublic DefaultHttp2DataFrame touch()
ReferenceCountedResourceLeakDetector. This method is a shortcut to touch(null).touch 在接口中 ByteBufHoldertouch 在接口中 Http2DataFrametouch 在接口中 ReferenceCountedpublic DefaultHttp2DataFrame touch(java.lang.Object hint)
ReferenceCountedResourceLeakDetector.touch 在接口中 ByteBufHoldertouch 在接口中 Http2DataFrametouch 在接口中 ReferenceCountedpublic boolean equals(java.lang.Object o)
AbstractHttp2StreamFrametrue if o has equal stream to this object.equals 在类中 AbstractHttp2StreamFramepublic int hashCode()
hashCode 在类中 AbstractHttp2StreamFrame