@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() |
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 ist set. |
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 |
stream(Http2FrameStream stream)
Set the
Http2FrameStream object for this frame. |
String |
toString() |
DefaultHttp2DataFrame |
touch() |
DefaultHttp2DataFrame |
touch(Object hint) |
stream
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
stream
public 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 stream(Http2FrameStream stream)
Http2StreamFrame
Http2FrameStream
object for this frame.stream
in interface Http2StreamFrame
stream
in class AbstractHttp2StreamFrame
public String name()
Http2Frame
name
in interface Http2Frame
public boolean isEndStream()
Http2DataFrame
true
if the END_STREAM flag ist set.isEndStream
in interface Http2DataFrame
public int padding()
Http2DataFrame
padding
in interface Http2DataFrame
public io.netty.buffer.ByteBuf content()
Http2DataFrame
null
.content
in interface io.netty.buffer.ByteBufHolder
content
in interface Http2DataFrame
public int initialFlowControlledBytes()
Http2DataFrame
Http2DataFrame.content()
is consumed
this will not change.initialFlowControlledBytes
in interface Http2DataFrame
public DefaultHttp2DataFrame copy()
copy
in interface io.netty.buffer.ByteBufHolder
copy
in interface Http2DataFrame
public DefaultHttp2DataFrame duplicate()
duplicate
in interface io.netty.buffer.ByteBufHolder
duplicate
in interface Http2DataFrame
public DefaultHttp2DataFrame retainedDuplicate()
retainedDuplicate
in interface io.netty.buffer.ByteBufHolder
retainedDuplicate
in interface Http2DataFrame
public DefaultHttp2DataFrame replace(io.netty.buffer.ByteBuf content)
replace
in interface io.netty.buffer.ByteBufHolder
replace
in interface Http2DataFrame
public int refCnt()
refCnt
in interface io.netty.util.ReferenceCounted
public boolean release()
release
in interface io.netty.util.ReferenceCounted
public boolean release(int decrement)
release
in interface io.netty.util.ReferenceCounted
public DefaultHttp2DataFrame retain()
retain
in interface io.netty.buffer.ByteBufHolder
retain
in interface Http2DataFrame
retain
in interface io.netty.util.ReferenceCounted
public DefaultHttp2DataFrame retain(int increment)
retain
in interface io.netty.buffer.ByteBufHolder
retain
in interface Http2DataFrame
retain
in interface io.netty.util.ReferenceCounted
public DefaultHttp2DataFrame touch()
touch
in interface io.netty.buffer.ByteBufHolder
touch
in interface Http2DataFrame
touch
in interface io.netty.util.ReferenceCounted
public DefaultHttp2DataFrame touch(Object hint)
touch
in interface io.netty.buffer.ByteBufHolder
touch
in interface Http2DataFrame
touch
in interface io.netty.util.ReferenceCounted
public boolean equals(Object o)
AbstractHttp2StreamFrame
true
if o
has equal stream
to this object.equals
in class AbstractHttp2StreamFrame
public int hashCode()
hashCode
in class AbstractHttp2StreamFrame
Copyright © 2008–2019 The Netty Project. All rights reserved.