Top Description Fields Constructors Methods
io.netty.handler.codec.spdy

public Class DefaultSpdyDataFrame

extends DefaultSpdyStreamFrame
implements SpdyDataFrame
Class Inheritance
All Implemented Interfaces
io.netty.handler.codec.spdy.SpdyDataFrame, io.netty.handler.codec.spdy.SpdyStreamFrame, io.netty.handler.codec.spdy.SpdyFrame, io.netty.buffer.ByteBufHolder, io.netty.util.ReferenceCounted
Imports
io.netty.buffer.ByteBuf, .ByteBufUtil, .Unpooled, io.netty.util.internal.ObjectUtil, .StringUtil

The default SpdyDataFrame implementation.

Field Summary

Modifier and TypeField and Description
private final ByteBuf

Constructor Summary

AccessConstructor and Description
public
DefaultSpdyDataFrame(int
the Stream-ID of this frame
streamId
)

Creates a new instance.

public
DefaultSpdyDataFrame(int
the Stream-ID of this frame
streamId
,
ByteBuf
the payload of the frame. Can not exceed SpdyCodecUtil#SPDY_MAX_LENGTH
data
)

Creates a new instance.

Method Summary

Modifier and TypeMethod and Description
public ByteBuf
content()

Implements io.netty.handler.codec.spdy.SpdyDataFrame.content.

Returns the data payload of this frame.
public SpdyDataFrame
copy()

Implements io.netty.handler.codec.spdy.SpdyDataFrame.copy.

Creates a deep copy of this ByteBufHolder.
public SpdyDataFrame
public int
refCnt()

Implements io.netty.util.ReferenceCounted.refCnt.

Returns the reference count of this object.
public boolean
release()

Implements io.netty.util.ReferenceCounted.release.

Decreases the reference count by 1 and deallocates this object if the reference count reaches at 0.
public boolean
release(int decrement)

Implements io.netty.util.ReferenceCounted.release.

Decreases the reference count by the specified decrement and deallocates this object if the reference count reaches at 0.
public SpdyDataFrame
replace(ByteBuf content)

Implements io.netty.handler.codec.spdy.SpdyDataFrame.replace.

Returns a new ByteBufHolder which contains the specified content.
public SpdyDataFrame
retain()

Implements io.netty.handler.codec.spdy.SpdyDataFrame.retain.

Increases the reference count by 1.
public SpdyDataFrame
retain(int increment)

Implements io.netty.handler.codec.spdy.SpdyDataFrame.retain.

Increases the reference count by the specified increment.
public SpdyDataFrame
public SpdyDataFrame
setLast(boolean last)

Overrides io.netty.handler.codec.spdy.DefaultSpdyStreamFrame.setLast.

Implements io.netty.handler.codec.spdy.SpdyDataFrame.setLast, io.netty.handler.codec.spdy.SpdyStreamFrame.setLast.

Sets if this frame is the last frame to be transmitted on the stream.
public SpdyDataFrame
public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.
public SpdyDataFrame
touch()

Implements io.netty.handler.codec.spdy.SpdyDataFrame.touch.

Records the current access location of this object for debugging purposes.
public SpdyDataFrame
touch(Object hint)

Implements io.netty.handler.codec.spdy.SpdyDataFrame.touch.

Records the current access location of this object with an additional arbitrary information for debugging purposes.
private static ByteBuf
Inherited from io.netty.handler.codec.spdy.DefaultSpdyStreamFrame:
isLaststreamId

Field Detail

databack to summary
private final ByteBuf data

Constructor Detail

DefaultSpdyDataFrameback to summary
public DefaultSpdyDataFrame(int streamId)

Creates a new instance.

Parameters
streamId:int

the Stream-ID of this frame

DefaultSpdyDataFrameback to summary
public DefaultSpdyDataFrame(int streamId, ByteBuf data)

Creates a new instance.

Parameters
streamId:int

the Stream-ID of this frame

data:ByteBuf

the payload of the frame. Can not exceed SpdyCodecUtil#SPDY_MAX_LENGTH

Method Detail

contentback to summary
public ByteBuf content()

Implements io.netty.handler.codec.spdy.SpdyDataFrame.content.

Doc from io.netty.handler.codec.spdy.SpdyDataFrame.content.

Returns the data payload of this frame. If there is no data payload Unpooled#EMPTY_BUFFER is returned. The data payload cannot exceed 16777215 bytes.

Annotations
@Override
copyback to summary
public SpdyDataFrame copy()

Implements io.netty.handler.codec.spdy.SpdyDataFrame.copy.

Doc from io.netty.buffer.ByteBufHolder.copy.

Creates a deep copy of this ByteBufHolder.

Annotations
@Override
duplicateback to summary
public SpdyDataFrame duplicate()

Implements io.netty.handler.codec.spdy.SpdyDataFrame.duplicate.

Doc from io.netty.buffer.ByteBufHolder.duplicate.

Duplicates this ByteBufHolder. Be aware that this will not automatically call retain().

Annotations
@Override
refCntback to summary
public int refCnt()

Implements io.netty.util.ReferenceCounted.refCnt.

Doc from io.netty.util.ReferenceCounted.refCnt.

Returns the reference count of this object. If 0, it means this object has been deallocated.

Annotations
@Override
releaseback to summary
public boolean release()

Implements io.netty.util.ReferenceCounted.release.

Doc from io.netty.util.ReferenceCounted.release.

Decreases the reference count by 1 and deallocates this object if the reference count reaches at 0.

Returns:boolean

true if and only if the reference count became 0 and this object has been deallocated

Annotations
@Override
releaseback to summary
public boolean release(int decrement)

Implements io.netty.util.ReferenceCounted.release.

Doc from io.netty.util.ReferenceCounted.release.

Decreases the reference count by the specified decrement and deallocates this object if the reference count reaches at 0.

Returns:boolean

true if and only if the reference count became 0 and this object has been deallocated

Annotations
@Override
replaceback to summary
public SpdyDataFrame replace(ByteBuf content)

Implements io.netty.handler.codec.spdy.SpdyDataFrame.replace.

Doc from io.netty.buffer.ByteBufHolder.replace.

Returns a new ByteBufHolder which contains the specified content.

Annotations
@Override
retainback to summary
public SpdyDataFrame retain()

Implements io.netty.handler.codec.spdy.SpdyDataFrame.retain.

Doc from io.netty.util.ReferenceCounted.retain.

Increases the reference count by 1.

Annotations
@Override
retainback to summary
public SpdyDataFrame retain(int increment)

Implements io.netty.handler.codec.spdy.SpdyDataFrame.retain.

Doc from io.netty.util.ReferenceCounted.retain.

Increases the reference count by the specified increment.

Annotations
@Override
retainedDuplicateback to summary
public SpdyDataFrame retainedDuplicate()

Implements io.netty.handler.codec.spdy.SpdyDataFrame.retainedDuplicate.

Doc from io.netty.buffer.ByteBufHolder.retainedDuplicate.

Duplicates this ByteBufHolder. This method returns a retained duplicate unlike duplicate().

Annotations
@Override
setLastback to summary
public SpdyDataFrame setLast(boolean last)

Overrides io.netty.handler.codec.spdy.DefaultSpdyStreamFrame.setLast.

Implements io.netty.handler.codec.spdy.SpdyDataFrame.setLast, io.netty.handler.codec.spdy.SpdyStreamFrame.setLast.

Doc from io.netty.handler.codec.spdy.SpdyStreamFrame.setLast.

Sets if this frame is the last frame to be transmitted on the stream.

Annotations
@Override
setStreamIdback to summary
public SpdyDataFrame setStreamId(int streamId)

Overrides io.netty.handler.codec.spdy.DefaultSpdyStreamFrame.setStreamId.

Implements io.netty.handler.codec.spdy.SpdyDataFrame.setStreamId, io.netty.handler.codec.spdy.SpdyStreamFrame.setStreamId.

Doc from io.netty.handler.codec.spdy.SpdyStreamFrame.setStreamId.

Sets the Stream-ID of this frame. The Stream-ID must be positive.

Annotations
@Override
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object.

Returns:String

a string representation of the object.

Annotations
@Override
touchback to summary
public SpdyDataFrame touch()

Implements io.netty.handler.codec.spdy.SpdyDataFrame.touch.

Doc from io.netty.util.ReferenceCounted.touch.

Records the current access location of this object for debugging purposes. If this object is determined to be leaked, the information recorded by this operation will be provided to you via ResourceLeakDetector. This method is a shortcut to touch(null).

Annotations
@Override
touchback to summary
public SpdyDataFrame touch(Object hint)

Implements io.netty.handler.codec.spdy.SpdyDataFrame.touch.

Doc from io.netty.util.ReferenceCounted.touch.

Records the current access location of this object with an additional arbitrary information for debugging purposes. If this object is determined to be leaked, the information recorded by this operation will be provided to you via ResourceLeakDetector.

Annotations
@Override
validateback to summary
private static ByteBuf validate(ByteBuf data)