Record Class Frame.Unknown

java.lang.Object
java.lang.Record
io.github.mahmoudimus.http2.Frame.Unknown
Record Components:
type - the extension frame type code from 10 to 255
flags - the raw eight-bit flags
streamId - the stream identifier, or 0 for the connection
payload - the payload bytes, retained without copying
All Implemented Interfaces:
Frame
Enclosing interface:
Frame

public static record Frame.Unknown(int type, int flags, int streamId, byte[] payload) extends Record implements Frame
A frame of a type this codec does not know (an extension). The reader discards these unless FrameReader.setDeliverUnknownFrames(boolean) asks for them; either way they must not change any state (§5.5).
  • Constructor Details

    • Unknown

      public Unknown(int type, int flags, int streamId, byte[] payload)
      Creates an extension frame with an eight-bit type and flags.
      Parameters:
      type - the extension frame type code from 10 to 255
      flags - the raw eight-bit flags
      streamId - the stream identifier, or 0 for the connection
      payload - the payload bytes, retained without copying
  • Method Details

    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • type

      public int type()
      Returns the value of the type record component.
      Specified by:
      type in interface Frame
      Returns:
      the value of the type record component
    • flags

      public int flags()
      Returns the value of the flags record component.
      Returns:
      the value of the flags record component
    • streamId

      public int streamId()
      Returns the value of the streamId record component.
      Specified by:
      streamId in interface Frame
      Returns:
      the value of the streamId record component
    • payload

      public byte[] payload()
      Returns the value of the payload record component.
      Returns:
      the value of the payload record component