Top Description Inners Fields Constructors Methods
org.eclipse.jetty.http3.parser

public Class HeaderParser

extends Object
Class Inheritance
Imports
java.nio.ByteBuffer, org.eclipse.jetty.http3.internal.VarLenInt

The parser for the frame header of HTTP/3 frames.

See Also
MessageParser

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static enum

Field Summary

Modifier and TypeField and Description
private long
private HeaderParser.State
private long
private final VarLenInt

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public long
public long
public boolean

Returns:

true if all the frame header bytes were parsed, false if not enough frame header bytes were present in the buffer
parse
(ByteBuffer
the buffer to parse
buffer
)

Parses the frame header bytes in the given buffer; only the frame header bytes are consumed, therefore when this method returns, the buffer may contain the unconsumed bytes of the frame body (or other frames).

public void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

lengthback to summary
private long length
stateback to summary
private HeaderParser.State state
typeback to summary
private long type
varLenIntback to summary
private final VarLenInt varLenInt

Constructor Detail

HeaderParserback to summary
public HeaderParser()

Method Detail

getFrameLengthback to summary
public long getFrameLength()
getFrameTypeback to summary
public long getFrameType()
parseback to summary
public boolean parse(ByteBuffer buffer)

Parses the frame header bytes in the given buffer; only the frame header bytes are consumed, therefore when this method returns, the buffer may contain the unconsumed bytes of the frame body (or other frames).

Parameters
buffer:ByteBuffer

the buffer to parse

Returns:boolean

true if all the frame header bytes were parsed, false if not enough frame header bytes were present in the buffer

resetback to summary
public void reset()
org.eclipse.jetty.http3.parser back to summary

private final Enum HeaderParser.State

extends Enum<HeaderParser.State>
Class Inheritance

Field Summary

Modifier and TypeField and Description
public static final HeaderParser.State
public static final HeaderParser.State

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static HeaderParser.State
public static HeaderParser.State[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

LENGTHback to summary
public static final HeaderParser.State LENGTH
TYPEback to summary
public static final HeaderParser.State TYPE

Constructor Detail

Stateback to summary
private State()

Method Detail

valueOfback to summary
public static HeaderParser.State valueOf(String name)
valuesback to summary
public static HeaderParser.State[] values()