APIdia Launch Partner
Top Description Fields Constructors Methods
jdk.internal.net.http.quic.frames

public final Class CryptoFrame

extends QuicFrame
Class Inheritance
Imports
java.nio.BufferOverflowException, .ByteBuffer, java.util.Objects, jdk.internal.net.http.common.Utils, jdk.internal.net.quic.QuicTransportErrors, .QuicTransportException, jdk.internal.net.http.quic.VariableLengthEncoder

A CRYPTO Frame
External Specification
https://www.rfc-editor.org/info/rfc9000

Field Summary

Modifier and TypeField and Description
private final ByteBuffer
private final int
private final long
Inherited from jdk.internal.net.http.quic.frames.QuicFrame:
ACKCONNECTION_CLOSECRYPTODATA_BLOCKEDHANDSHAKE_DONEMAX_DATAMAX_STREAM_DATAMAX_STREAMSMAX_VL_INTEGERNEW_CONNECTION_IDNEW_TOKENPADDINGPATH_CHALLENGEPATH_RESPONSEPINGRESET_STREAMRETIRE_CONNECTION_IDSTOP_SENDINGSTREAMSTREAM_DATA_BLOCKEDSTREAMS_BLOCKED

Constructor Summary

AccessConstructor and Description
pack-priv
CryptoFrame(ByteBuffer buffer, int type)

public
CryptoFrame(long offset, int length, ByteBuffer cryptoData)

Creates CryptoFrame

private
CryptoFrame(long offset, int length, ByteBuffer cryptoData, boolean slice)

Method Summary

Modifier and TypeMethod and Description
public static int
public void
encode(ByteBuffer dest)

Implements abstract jdk.internal.net.http.quic.frames.QuicFrame.encode.

Encode this QUIC Frame into given ByteBuffer

public int
public long

Returns:

the frame offset
offset
()

Returns the frame offset.

public ByteBuffer

Returns:

the frame payload
payload
()

Returns the frame payload.

public int
size()

Implements abstract jdk.internal.net.http.quic.frames.QuicFrame.size.

Returns the minimum number of bytes needed to encode this frame.

public CryptoFrame

Returns:

a slice of the current crypto frame
slice
(long
the new offset
offset
,
int
the new length
length
)

Creates a new CryptoFrame which is a slice of this crypto frame.

public String
toString()

Overrides jdk.internal.net.http.quic.frames.QuicFrame.toString.

Returns a string representation of the object.

Inherited from jdk.internal.net.http.quic.frames.QuicFrame:
decodedecodeVLFielddecodeVLFieldAsIntencodeVLFieldframeClassOfframeTypeframeTypeOfgetTypeFieldgetVLFieldLengthForisAckElicitingisValidInputByteBufferrequireVLRangerequireVLRangevalidateRemainingLength

Field Detail

cryptoDataback to summary
private final ByteBuffer cryptoData
lengthback to summary
private final int length
offsetback to summary
private final long offset

Constructor Detail

CryptoFrameback to summary
pack-priv CryptoFrame(ByteBuffer buffer, int type) throws QuicTransportException
CryptoFrameback to summary
public CryptoFrame(long offset, int length, ByteBuffer cryptoData)

Creates CryptoFrame

CryptoFrameback to summary
private CryptoFrame(long offset, int length, ByteBuffer cryptoData, boolean slice)

Method Detail

compareOffsetsback to summary
public static int compareOffsets(CryptoFrame cf1, CryptoFrame cf2)
encodeback to summary
public void encode(ByteBuffer dest)

Implements abstract jdk.internal.net.http.quic.frames.QuicFrame.encode.

Doc from jdk.internal.net.http.quic.frames.QuicFrame.encode.

Encode this QUIC Frame into given ByteBuffer

Annotations
@Override
lengthback to summary
public int length()
offsetback to summary
public long offset()

Returns the frame offset.

Returns:long

the frame offset

payloadback to summary
public ByteBuffer payload()

Returns the frame payload.

Returns:ByteBuffer

the frame payload

sizeback to summary
public int size()

Implements abstract jdk.internal.net.http.quic.frames.QuicFrame.size.

Doc from jdk.internal.net.http.quic.frames.QuicFrame.size.

Returns the minimum number of bytes needed to encode this frame.

Annotations
@Override
sliceback to summary
public CryptoFrame slice(long offset, int length)

Creates a new CryptoFrame which is a slice of this crypto frame.

Parameters
offset:long

the new offset

length:int

the new length

Returns:CryptoFrame

a slice of the current crypto frame

Exceptions
IndexOutOfBoundsException:
if the offset or length exceed the bounds of this crypto frame
toStringback to summary
public String toString()

Overrides jdk.internal.net.http.quic.frames.QuicFrame.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Annotations
@Override