Record Class Http3Frame.Data

java.lang.Object
java.lang.Record
org.microproxy.frames.Http3Frame.Data
Record Components:
data - the content, not copied
All Implemented Interfaces:
Http3Frame, HttpFrame
Enclosing interface:
Http3Frame

public static record Http3Frame.Data(byte[] data) extends Record implements Http3Frame
DATA (section 7.2.1).
  • Constructor Details

    • Data

      public Data(byte[] data)
      Creates DATA.
      Parameters:
      data - the content, not copied
  • Method Details

    • typeName

      public String typeName()
      Description copied from interface: HttpFrame
      The frame type's name as the protocol's RFC spells it (DATA, HEADERS, SETTINGS, ...), or UNKNOWN for an extension or reserved type.
      Specified by:
      typeName in interface HttpFrame
      Returns:
      the frame type name
    • typeCode

      public long typeCode()
      Description copied from interface: HttpFrame
      The frame type's code on the wire.
      Specified by:
      typeCode in interface HttpFrame
      Returns:
      the unsigned type code
    • text

      public String text()
      The content as UTF-8 text (malformed sequences replaced).
      Returns:
      the decoded content
    • withData

      public Http3Frame.Data withData(byte[] newData)
      This frame with other content.
      Parameters:
      newData - the new content
      Returns:
      a copy with it
    • withText

      public Http3Frame.Data withText(String text)
      This frame with text, encoded as UTF-8, as its content.
      Parameters:
      text - the new content
      Returns:
      a copy with the text
    • equals

      public boolean equals(Object o)
      Compares the content, not the array's identity.
      Specified by:
      equals in class Record
    • hashCode

      public 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
    • toString

      public 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
    • data

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