Package io.github.mahmoudimus.http3
Record Class Http3Frame.Data
java.lang.Object
java.lang.Record
io.github.mahmoudimus.http3.Http3Frame.Data
- Record Components:
data- the content, not copied
- All Implemented Interfaces:
Http3Frame
- Enclosing interface:
Http3Frame
DATA (§7.2.1): part of a message's content.
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.github.mahmoudimus.http3.Http3Frame
Http3Frame.CancelPush, Http3Frame.Data, Http3Frame.GoAway, Http3Frame.Headers, Http3Frame.MaxPushId, Http3Frame.PushPromise, Http3Frame.Settings, Http3Frame.Unknown -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbyte[]data()Returns the value of thedatarecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.longtype()The frame type code: one of theHttp3FrameTypeconstants, or any other forHttp3Frame.Unknown.
-
Constructor Details
-
Data
public Data(byte[] data) Creates DATA.- Parameters:
data- the content, not copied
-
-
Method Details
-
type
public long type()Description copied from interface:Http3FrameThe frame type code: one of theHttp3FrameTypeconstants, or any other forHttp3Frame.Unknown.- Specified by:
typein interfaceHttp3Frame- Returns:
- the type code
-
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. -
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. -
equals
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. All components in this record class are compared withObjects::equals(Object,Object). -
data
public byte[] data()Returns the value of thedatarecord component.- Returns:
- the value of the
datarecord component
-