Record Class StreamMeta
java.lang.Object
java.lang.Record
io.github.mahmoudimus.quic.connection.StreamMeta
- Record Components:
id- the streamstart- the first stream offset carriedend- one past the last stream offset carriedfin- whether the frame carried the FIN bit
What a sent STREAM frame carried, without its data, which stays in the stream's
SendBuffer: kept with the sent packet to acknowledge or retransmit the range.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intThe largest STREAM frame header: type, stream ID, offset and length. -
Constructor Summary
ConstructorsConstructorDescriptionStreamMeta(StreamId id, long start, long end, boolean fin) Creates an instance of aStreamMetarecord class. -
Method Summary
Modifier and TypeMethodDescriptionvoidencodeHeader(boolean length, ByteBuffer out) Writes the STREAM frame header (RFC 9000 section 19.8); the data follows.longend()Returns the value of theendrecord component.final booleanIndicates whether some other object is "equal to" this one.booleanfin()Returns the value of thefinrecord component.final inthashCode()Returns a hash code value for this object.id()Returns the value of theidrecord component.longstart()Returns the value of thestartrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
SIZE_BOUND
public static final int SIZE_BOUNDThe largest STREAM frame header: type, stream ID, offset and length.- See Also:
-
-
Constructor Details
-
Method Details
-
encodeHeader
Writes the STREAM frame header (RFC 9000 section 19.8); the data follows.- Parameters:
length- whether to include the Length fieldout- the buffer, written at its position
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
id
Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-
start
public long start()Returns the value of thestartrecord component.- Returns:
- the value of the
startrecord component
-
end
public long end()Returns the value of theendrecord component.- Returns:
- the value of the
endrecord component
-
fin
public boolean fin()Returns the value of thefinrecord component.- Returns:
- the value of the
finrecord component
-