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(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.
|
Modifier and Type | Method and Description |
---|---|
ByteBuf |
content()
Payload of DATA frame.
|
DefaultHttp2DataFrame |
copy()
Create a deep copy of this
ByteBufHolder . |
DefaultHttp2DataFrame |
duplicate()
Duplicate the
ByteBufHolder . |
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. |
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 |
retain()
Increases the reference count by
1 . |
DefaultHttp2DataFrame |
retain(int increment)
Increases the reference count by the specified
increment . |
DefaultHttp2DataFrame |
setStream(Object stream)
Set the stream identifier for this message.
|
String |
toString() |
DefaultHttp2DataFrame |
touch()
Records the current access location of this object for debugging purposes.
|
DefaultHttp2DataFrame |
touch(Object hint)
Records the current access location of this object with an additonal arbitrary information for debugging
purposes.
|
stream
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
stream
public 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 sizepublic DefaultHttp2DataFrame setStream(Object stream)
Http2StreamFrame
setStream
in interface Http2DataFrame
setStream
in interface Http2StreamFrame
setStream
in class AbstractHttp2StreamFrame
this
public boolean isEndStream()
Http2DataFrame
true
if this frame is the last one in this direction of the stream.isEndStream
in interface Http2DataFrame
public int padding()
Http2DataFrame
padding
in interface Http2DataFrame
public ByteBuf content()
Http2DataFrame
null
.content
in interface ByteBufHolder
content
in interface Http2DataFrame
public DefaultHttp2DataFrame copy()
ByteBufHolder
ByteBufHolder
.copy
in interface ByteBufHolder
copy
in interface Http2DataFrame
public DefaultHttp2DataFrame duplicate()
ByteBufHolder
ByteBufHolder
. Be aware that this will not automatically call ByteBufHolder.retain()
.duplicate
in interface ByteBufHolder
duplicate
in interface Http2DataFrame
public int refCnt()
ReferenceCounted
0
, it means this object has been deallocated.refCnt
in interface ReferenceCounted
public boolean release()
ReferenceCounted
1
and deallocates this object if the reference count reaches at
0
.release
in interface ReferenceCounted
true
if and only if the reference count became 0
and this object has been deallocatedpublic boolean release(int decrement)
ReferenceCounted
decrement
and deallocates this object if the reference
count reaches at 0
.release
in interface ReferenceCounted
true
if and only if the reference count became 0
and this object has been deallocatedpublic DefaultHttp2DataFrame retain()
ReferenceCounted
1
.retain
in interface ByteBufHolder
retain
in interface Http2DataFrame
retain
in interface ReferenceCounted
public DefaultHttp2DataFrame retain(int increment)
ReferenceCounted
increment
.retain
in interface ByteBufHolder
retain
in interface Http2DataFrame
retain
in interface ReferenceCounted
public DefaultHttp2DataFrame touch()
ReferenceCounted
ResourceLeakDetector
. This method is a shortcut to touch(null)
.touch
in interface ByteBufHolder
touch
in interface Http2DataFrame
touch
in interface ReferenceCounted
public DefaultHttp2DataFrame touch(Object hint)
ReferenceCounted
ResourceLeakDetector
.touch
in interface ByteBufHolder
touch
in interface Http2DataFrame
touch
in interface 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–2016 The Netty Project. All rights reserved.