public class DefaultSpdyDataFrame extends DefaultSpdyStreamFrame implements SpdyDataFrame
SpdyDataFrame
implementation.构造器和说明 |
---|
DefaultSpdyDataFrame(int streamId)
Creates a new instance.
|
DefaultSpdyDataFrame(int streamId,
ByteBuf data)
Creates a new instance.
|
限定符和类型 | 方法和说明 |
---|---|
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, streamId
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
isLast, streamId
public 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_LENGTH
public SpdyDataFrame setStreamId(int streamId)
SpdyStreamFrame
setStreamId
在接口中 SpdyDataFrame
setStreamId
在接口中 SpdyStreamFrame
setStreamId
在类中 DefaultSpdyStreamFrame
public SpdyDataFrame setLast(boolean last)
SpdyStreamFrame
setLast
在接口中 SpdyDataFrame
setLast
在接口中 SpdyStreamFrame
setLast
在类中 DefaultSpdyStreamFrame
public ByteBuf content()
SpdyDataFrame
Unpooled.EMPTY_BUFFER
is returned.
The data payload cannot exceed 16777215 bytes.content
在接口中 ByteBufHolder
content
在接口中 SpdyDataFrame
public SpdyDataFrame copy()
ByteBufHolder
ByteBufHolder
.copy
在接口中 ByteBufHolder
copy
在接口中 SpdyDataFrame
public SpdyDataFrame duplicate()
ByteBufHolder
ByteBufHolder
. Be aware that this will not automatically call ByteBufHolder.retain()
.duplicate
在接口中 ByteBufHolder
duplicate
在接口中 SpdyDataFrame
public int refCnt()
ReferenceCounted
0
, it means this object has been deallocated.refCnt
在接口中 ReferenceCounted
public SpdyDataFrame retain()
ReferenceCounted
1
.retain
在接口中 ByteBufHolder
retain
在接口中 SpdyDataFrame
retain
在接口中 ReferenceCounted
public SpdyDataFrame retain(int increment)
ReferenceCounted
increment
.retain
在接口中 ByteBufHolder
retain
在接口中 SpdyDataFrame
retain
在接口中 ReferenceCounted
public boolean release()
ReferenceCounted
1
and deallocates this object if the reference count reaches at
0
.release
在接口中 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
在接口中 ReferenceCounted
true
if and only if the reference count became 0
and this object has been deallocatedpublic java.lang.String toString()
toString
在类中 java.lang.Object