Class Http2FrameHeader

java.lang.Object
io.helidon.http.http2.Http2FrameHeader

public class Http2FrameHeader extends Object
Frame header. HTTP/2 frame header has a fixed length of 9 bytes.
  • Field Details

  • Method Details

    • create

      public static Http2FrameHeader create(BufferData bytes)
      Create a header from header bytes.
      Parameters:
      bytes - frame header data, contains at least 9 bytes.
      Returns:
      frame header parsed from the data
    • create

      public static <T extends Http2Flag> Http2FrameHeader create(int length, Http2FrameTypes<T> frameType, T flags, int streamIdentifier)
      Create a frame header from known values.
      Type Parameters:
      T - type of flags
      Parameters:
      length - length of the associate frame data
      frameType - frame types of this frame
      flags - flags of the frame
      streamIdentifier - stream this frame belongs to
      Returns:
      frame header
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • flags

      public <T extends Http2Flag> T flags(Http2FrameTypes<T> types)
      Get typed flags of this frame header.
      Type Parameters:
      T - type of flags
      Parameters:
      types - frame types
      Returns:
      correctly typed flags
    • type

      public Http2FrameType type()
      Frame type enum.
      Returns:
      frame type
    • length

      public int length()
      Length of the associated frame data.
      Returns:
      frame data length
    • flags

      public int flags()
      Flags as an integer.
      Returns:
      flags
    • streamId

      public int streamId()
      Stream id this header belongs to.
      Returns:
      stream id (0 means this is connection related, not stream related)
    • write

      public BufferData write()
      Write this header as buffer data.
      Returns:
      buffer data of this headewr
    • typedFlags

      public Http2Flag typedFlags()
      Flags typed correctly based on the type().
      Returns:
      typed flags
      See Also: