java.lang.Object
robaho.net.httpserver.http2.frame.FrameHeader
Create a frame header object
-
Constructor Summary
ConstructorsConstructorDescriptionFrameHeader(int length, FrameType type, FrameFlag.FlagSet flags, int streamIdentifier) -
Method Summary
Modifier and TypeMethodDescriptionstatic Stringdebug(byte[] header) byte[]encode()byte[]encode(byte[] buffer) encode into an existing byte arraystatic byte[]encode(int length, FrameType frameType, FrameFlag.FlagSet flags, int streamId) getFlags()defined as an EnumSet<FrameFlag>, it identifies flags associated with a particular frameint24-bit unsigned integer value that specifies length of the frameint31-bit unsigned integer uniquely identifies a framegetType()defined as an enum FrameType, it identifies the type of the framestatic FrameHeaderParse(byte[] tmpBuffer) Parse the 9 bytes frame header to determine length, type, flags and the stream identifiertoString()voidwriteTo(OutputStream os) static voidwriteTo(OutputStream os, int length, FrameType frameType, FrameFlag.FlagSet flags, int streamId)
-
Constructor Details
-
FrameHeader
-
-
Method Details
-
getLength
public int getLength()24-bit unsigned integer value that specifies length of the frame -
getType
defined as an enum FrameType, it identifies the type of the frame -
getFlags
defined as an EnumSet<FrameFlag>, it identifies flags associated with a particular frame -
getStreamIdentifier
public int getStreamIdentifier()31-bit unsigned integer uniquely identifies a frame -
toString
-
Parse
Parse the 9 bytes frame header to determine length, type, flags and the stream identifier- Parameters:
tmpBuffer- 9 bytes frame header- Returns:
- Throws:
Exception
-
debug
-
writeTo
- Throws:
IOException
-
writeTo
public static void writeTo(OutputStream os, int length, FrameType frameType, FrameFlag.FlagSet flags, int streamId) throws IOException - Throws:
IOException
-
encode
-
encode
public byte[] encode() -
encode
public byte[] encode(byte[] buffer) encode into an existing byte array
-