public class DefaultSpdyDataFrame extends DefaultSpdyStreamFrame implements SpdyDataFrame
SpdyDataFrame implementation.| Constructor and Description |
|---|
DefaultSpdyDataFrame(int streamId)
Creates a new instance.
|
DefaultSpdyDataFrame(int streamId,
ByteBuf data)
Creates a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
ByteBuf |
content()
Returns the data payload of this frame.
|
SpdyDataFrame |
copy()
Create a deep copy of this
ByteBufHolder. |
SpdyDataFrame |
duplicate()
Duplicate the
ByteBufHolder. |
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. |
SpdyDataFrame |
retain()
Increases the reference count by
1. |
SpdyDataFrame |
retain(int increment)
Increases the reference count by the specified
increment. |
SpdyDataFrame |
setLast(boolean last)
Sets if this frame is the last frame to be transmitted on the stream.
|
SpdyDataFrame |
setStreamId(int streamId)
Sets the Stream-ID of this frame.
|
java.lang.String |
toString() |
isLast, streamIdclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitisLast, streamIdpublic DefaultSpdyDataFrame(int streamId)
streamId - the Stream-ID of this framepublic DefaultSpdyDataFrame(int streamId,
ByteBuf data)
streamId - the Stream-ID of this framedata - the payload of the frame. Can not exceed SpdyCodecUtil.SPDY_MAX_LENGTHpublic SpdyDataFrame setStreamId(int streamId)
SpdyStreamFramesetStreamId in interface SpdyDataFramesetStreamId in interface SpdyStreamFramesetStreamId in class DefaultSpdyStreamFramepublic SpdyDataFrame setLast(boolean last)
SpdyStreamFramesetLast in interface SpdyDataFramesetLast in interface SpdyStreamFramesetLast in class DefaultSpdyStreamFramepublic ByteBuf content()
SpdyDataFrameUnpooled.EMPTY_BUFFER is returned.
The data payload cannot exceed 16777215 bytes.content in interface ByteBufHoldercontent in interface SpdyDataFramepublic SpdyDataFrame copy()
ByteBufHolderByteBufHolder.copy in interface ByteBufHoldercopy in interface SpdyDataFramepublic SpdyDataFrame duplicate()
ByteBufHolderByteBufHolder. Be aware that this will not automatically call ByteBufHolder.retain().duplicate in interface ByteBufHolderduplicate in interface SpdyDataFramepublic int refCnt()
ReferenceCounted0, it means this object has been deallocated.refCnt in interface ReferenceCountedpublic SpdyDataFrame retain()
ReferenceCounted1.retain in interface ByteBufHolderretain in interface SpdyDataFrameretain in interface ReferenceCountedpublic SpdyDataFrame retain(int increment)
ReferenceCountedincrement.retain in interface ByteBufHolderretain in interface SpdyDataFrameretain in interface ReferenceCountedpublic boolean release()
ReferenceCounted1 and deallocates this object if the reference count reaches at
0.release in interface 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 in interface ReferenceCountedtrue if and only if the reference count became 0 and this object has been deallocatedpublic java.lang.String toString()
toString in class java.lang.ObjectCopyright © 2008–2018 The Netty Project. All rights reserved.