@UnstableApi public final class DefaultHttp2DataFrame extends AbstractHttp2StreamFrame implements Http2DataFrame
Http2DataFrame implementation.| Constructor and Description |
|---|
DefaultHttp2DataFrame(boolean endStream)
Equivalent to
new DefaultHttp2DataFrame(Unpooled.EMPTY_BUFFER, endStream). |
DefaultHttp2DataFrame(io.netty.buffer.ByteBuf content)
Equivalent to
new DefaultHttp2DataFrame(content, false). |
DefaultHttp2DataFrame(io.netty.buffer.ByteBuf content,
boolean endStream)
Equivalent to
new DefaultHttp2DataFrame(content, endStream, 0). |
DefaultHttp2DataFrame(io.netty.buffer.ByteBuf content,
boolean endStream,
int padding)
Construct a new data message.
|
| Modifier and Type | Method and Description |
|---|---|
io.netty.buffer.ByteBuf |
content()
Payload of DATA frame.
|
DefaultHttp2DataFrame |
copy() |
DefaultHttp2DataFrame |
duplicate() |
boolean |
equals(Object o)
Returns
true if o has equal stream to this object. |
int |
hashCode() |
boolean |
isEndStream()
true if this frame is the last one in this direction of the stream. |
String |
name()
Returns the name of the HTTP/2 frame e.g.
|
int |
padding()
Frame padding to use.
|
int |
refCnt() |
boolean |
release() |
boolean |
release(int decrement) |
DefaultHttp2DataFrame |
replace(io.netty.buffer.ByteBuf content) |
DefaultHttp2DataFrame |
retain() |
DefaultHttp2DataFrame |
retain(int increment) |
DefaultHttp2DataFrame |
retainedDuplicate() |
DefaultHttp2DataFrame |
streamId(int streamId)
Sets the identifier of the stream this frame applies to.
|
String |
toString() |
DefaultHttp2DataFrame |
touch() |
DefaultHttp2DataFrame |
touch(Object hint) |
streamIdclone, finalize, getClass, notify, notifyAll, wait, wait, waitstreamIdpublic DefaultHttp2DataFrame(io.netty.buffer.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(io.netty.buffer.ByteBuf content,
boolean endStream)
new DefaultHttp2DataFrame(content, endStream, 0).content - non-null payloadendStream - whether this data should terminate the streampublic DefaultHttp2DataFrame(io.netty.buffer.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 streamId(int streamId)
Http2StreamFrameNOTE: This method is supposed to be called by the HTTP/2 transport only. It must not be called by users.
streamId in interface Http2StreamFramestreamId in class AbstractHttp2StreamFramethispublic String name()
Http2Framename in interface Http2Framepublic boolean isEndStream()
Http2DataFrametrue if this frame is the last one in this direction of the stream.isEndStream in interface Http2DataFramepublic int padding()
Http2DataFramepadding in interface Http2DataFramepublic io.netty.buffer.ByteBuf content()
Http2DataFramenull.content in interface io.netty.buffer.ByteBufHoldercontent in interface Http2DataFramepublic DefaultHttp2DataFrame copy()
copy in interface io.netty.buffer.ByteBufHoldercopy in interface Http2DataFramepublic DefaultHttp2DataFrame duplicate()
duplicate in interface io.netty.buffer.ByteBufHolderduplicate in interface Http2DataFramepublic DefaultHttp2DataFrame retainedDuplicate()
retainedDuplicate in interface io.netty.buffer.ByteBufHolderretainedDuplicate in interface Http2DataFramepublic DefaultHttp2DataFrame replace(io.netty.buffer.ByteBuf content)
replace in interface io.netty.buffer.ByteBufHolderreplace in interface Http2DataFramepublic int refCnt()
refCnt in interface io.netty.util.ReferenceCountedpublic boolean release()
release in interface io.netty.util.ReferenceCountedpublic boolean release(int decrement)
release in interface io.netty.util.ReferenceCountedpublic DefaultHttp2DataFrame retain()
retain in interface io.netty.buffer.ByteBufHolderretain in interface Http2DataFrameretain in interface io.netty.util.ReferenceCountedpublic DefaultHttp2DataFrame retain(int increment)
retain in interface io.netty.buffer.ByteBufHolderretain in interface Http2DataFrameretain in interface io.netty.util.ReferenceCountedpublic DefaultHttp2DataFrame touch()
touch in interface io.netty.buffer.ByteBufHoldertouch in interface Http2DataFrametouch in interface io.netty.util.ReferenceCountedpublic DefaultHttp2DataFrame touch(Object hint)
touch in interface io.netty.buffer.ByteBufHoldertouch in interface Http2DataFrametouch in interface io.netty.util.ReferenceCountedpublic boolean equals(Object o)
AbstractHttp2StreamFrametrue if o has equal stream to this object.equals in class AbstractHttp2StreamFramepublic int hashCode()
hashCode in class AbstractHttp2StreamFrameCopyright © 2008–2017 The Netty Project. All rights reserved.