APIdia Launch Partner
Top Description Methods
jdk.internal.net.http.http3.frames

public sealed Interface Http3Frame

permits AbstractHttp3Frame
Known Direct Implementers
jdk.internal.net.http.http3.frames.AbstractHttp3Frame
Imports
java.util.function.LongPredicate, jdk.internal.net.http.common.Logger, jdk.internal.net.http.http3.Http3Error, jdk.internal.net.http.quic.BuffersReader, .VariableLengthEncoder

An HTTP/3 frame

Method Summary

Modifier and TypeMethod and Description
public static Http3Frame

Returns:

the decoded frame, or null if some bytes are missing to decode the frame
decode
(BuffersReader
the reader containing the bytes
reader
,
LongPredicate
a predicate to test whether a given frame type is allowed in this context
isFrameTypeAllowed
,
Logger
a logger to log debug traces
debug
)

Attempts to decode an HTTP/3 frame from the bytes accumulated in the reader.

public long

Returns:

the length of this frame
length
()

Returns the length of this frame.

public default long

Returns:

the portion of the frame payload that can be read after the frame was created, when the current frame can be read as a partial frame, otherwise 0, if the payload can't be streamed
streamingLength
()

Returns the portion of the frame payload that can be read after the frame was created, when the current frame can be read as a partial frame, otherwise 0, if the payload can't be streamed.

public long

Returns:

the type of this frame
type
()

Returns the type of this frame.

Method Detail

decodeback to summary
public static Http3Frame decode(BuffersReader reader, LongPredicate isFrameTypeAllowed, Logger debug)

Attempts to decode an HTTP/3 frame from the bytes accumulated in the reader.

API Note

If an error is detected while parsing the frame, a MalformedFrame error will be returned

Parameters
reader:BuffersReader

the reader containing the bytes

isFrameTypeAllowed:LongPredicate

a predicate to test whether a given frame type is allowed in this context

debug:Logger

a logger to log debug traces

Returns:Http3Frame

the decoded frame, or null if some bytes are missing to decode the frame

lengthback to summary
public long length()

Returns the length of this frame.

Returns:long

the length of this frame

streamingLengthback to summary
public default long streamingLength()

Returns the portion of the frame payload that can be read after the frame was created, when the current frame can be read as a partial frame, otherwise 0, if the payload can't be streamed.

Returns:long

the portion of the frame payload that can be read after the frame was created, when the current frame can be read as a partial frame, otherwise 0, if the payload can't be streamed

typeback to summary
public long type()

Returns the type of this frame.

Returns:long

the type of this frame