| Modifier and Type | Field and Description |
|---|---|
| private final int | |
| private static final int | |
| private final boolean | |
| private static final int | |
| private final int | |
| private static final int | |
| private final long | |
| private final ByteBuffer | |
| private final long | |
| private final boolean |
| Access | Constructor and Description |
|---|---|
| pack-priv | |
| public | StreamFrame(long streamID, long offset, int length, boolean fin, ByteBuffer streamData)
Creates StreamFrame (length == -1 means no length specified in frame and is assumed to occupy the remainder of the Quic/UDP packet. |
| private | StreamFrame(long streamID, long offset, int length, boolean fin, ByteBuffer streamData, boolean slice)
|
| Modifier and Type | Method and Description |
|---|---|
| public static int | |
| public int | Returns: the number of data bytes in the frameReturns the number of data bytes in the frame. |
| public void | encode(ByteBuffer dest)
Implements abstract jdk. Encode this QUIC Frame into given ByteBuffer |
| public long | getTypeField()
Overrides jdk. Returns the type field that was / should be encoded. |
| public boolean | |
| public static int | Returns: the estimated size of the header for aStreamFrame that would
be created with the given parameters.the encoder, long QuicPacketEncoder - which can be used in case
some part of the computation is Quic-version dependent.the stream id streamId, long the stream offset offset, long the estimated length of the frame, typically this will be
the min between the data available in the stream with respect
to flow control, and the maximum remaining size for the datagram
payload length)Computes the header size that would be required to encode a frame with the given streamId, offset, and length. |
| public boolean | Returns: true if this is the last frame in the streamReturns true if this is the last frame in the stream. |
| public long | |
| public ByteBuffer | |
| public int | size()
Implements abstract jdk. Returns the minimum number of bytes needed to encode this frame. |
| public StreamFrame | Returns: a slice of the current stream framethe new offset offset, int the new length length)Creates a new StreamFrame which is a slice of this stream frame. |
| public long | |
| public String | toString()
Overrides jdk. Returns a string representation of the object. |
| dataLength | back to summary |
|---|---|
| private final int dataLength | |
| FIN | back to summary |
|---|---|
| private static final int FIN | |
| fin | back to summary |
|---|---|
| private final boolean fin | |
| LEN | back to summary |
|---|---|
| private static final int LEN | |
| length | back to summary |
|---|---|
| private final int length | |
| OFF | back to summary |
|---|---|
| private static final int OFF | |
| offset | back to summary |
|---|---|
| private final long offset | |
| streamData | back to summary |
|---|---|
| private final ByteBuffer streamData | |
| streamID | back to summary |
|---|---|
| private final long streamID | |
| typeFieldHasOFF | back to summary |
|---|---|
| private final boolean typeFieldHasOFF | |
| StreamFrame | back to summary |
|---|---|
| pack-priv StreamFrame(ByteBuffer buffer, int type) throws QuicTransportException | |
| StreamFrame | back to summary |
|---|---|
| public StreamFrame(long streamID, long offset, int length, boolean fin, ByteBuffer streamData) Creates StreamFrame (length == -1 means no length specified in frame and is assumed to occupy the remainder of the Quic/UDP packet. If a length is specified then it must correspond with the remaining bytes in streamData | |
| StreamFrame | back to summary |
|---|---|
| private StreamFrame(long streamID, long offset, int length, boolean fin, ByteBuffer streamData, boolean slice) | |
| compareOffsets | back to summary |
|---|---|
| public static int compareOffsets(StreamFrame sf1, StreamFrame sf2) | |
| dataLength | back to summary |
|---|---|
| public int dataLength() Returns the number of data bytes in the frame. API Note This is equivalent to calling
| |
| encode | back to summary |
|---|---|
| public void encode(ByteBuffer dest) Implements abstract jdk. Doc from jdk. Encode this QUIC Frame into given ByteBuffer
| |
| getTypeField | back to summary |
|---|---|
| public long getTypeField() Overrides jdk. Doc from jdk. Returns the type field that was / should be encoded. This is the frame type with possibly some additional bits set, depending on the frame.
| |
| hasLength | back to summary |
|---|---|
| public boolean hasLength() Returns whether this frame has a length. A frame that doesn't have a length must be the last frame in the packet.
| |
| headerSize | back to summary |
|---|---|
| public static int headerSize(QuicPacketEncoder encoder, long streamId, long offset, long length) Computes the header size that would be required to encode a frame with the given streamId, offset, and length. API Note This method is useful to figure out how many bytes can be allocated for the frame data, given a size constraint imposed by the space available for the whole datagram payload.
| |
| isLast | back to summary |
|---|---|
| public boolean isLast() Returns true if this is the last frame in the stream. The last frame has the FIN bit set.
| |
| offset | back to summary |
|---|---|
| public long offset() Returns the frame offset.
| |
| payload | back to summary |
|---|---|
| public ByteBuffer payload() Returns the frame payload.
| |
| size | back to summary |
|---|---|
| public int size() Implements abstract jdk. Doc from jdk. Returns the minimum number of bytes needed to encode this frame.
| |
| slice | back to summary |
|---|---|
| public StreamFrame slice(long offset, int length) Creates a new StreamFrame which is a slice of this stream frame.
| |
| streamId | back to summary |
|---|---|
| public long streamId() Returns the stream id.
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides jdk. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non-
| |