Package org.eclipse.jetty.http2.parser
Class HeaderParser
java.lang.Object
org.eclipse.jetty.http2.parser.HeaderParser
The parser for the frame header of HTTP/2 frames.
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
getFlags()
Returns the raw value of the header flag bits.int
int
int
boolean
hasFlag
(int bit) Returns whether the given headerflag
is present.boolean
parse
(ByteBuffer buffer) Parses the header bytes in the givenbuffer
; only the header bytes are consumed, therefore when this method returns, the buffer may contain unconsumed bytes.protected void
reset()
toString()
-
Constructor Details
-
HeaderParser
-
-
Method Details
-
getRateControl
-
reset
protected void reset() -
parse
Parses the header bytes in the given
buffer
; only the header bytes are consumed, therefore when this method returns, the buffer may contain unconsumed bytes.- Parameters:
buffer
- the buffer to parse- Returns:
- true if the whole header bytes were parsed, false if not enough header bytes were present in the buffer
-
getLength
public int getLength() -
getFrameType
public int getFrameType() -
hasFlag
public boolean hasFlag(int bit) Returns whether the given header
flag
is present.- Parameters:
bit
- the flag to test for presence- Returns:
- whether the flag is present
-
getFlags
public int getFlags()Returns the raw value of the header flag bits.
Use
hasFlag(int)
to test for flag presence. This method should be used just to retrieve the raw value of all the flag bits.- Returns:
- the raw value of the headers flag bits
- See Also:
-
getStreamId
public int getStreamId() -
toString
-