Record Class ConfluentWireFormat.Frame
java.lang.Object
java.lang.Record
io.krabka.streams.schema.ConfluentWireFormat.Frame
- Record Components:
schemaId- the registry schema ID from the headerbody- the record body that followed the header
- Enclosing class:
ConfluentWireFormat
A decoded frame. The body is defensively copied in both directions.
-
Constructor Summary
ConstructorsConstructorDescriptionFrame(int schemaId, byte[] body) Copies the body so later mutation of the input array cannot change the frame. -
Method Summary
Modifier and TypeMethodDescriptionbyte[]body()Returns a copy of the record body.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intschemaId()Returns the value of theschemaIdrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Frame
public Frame(int schemaId, byte[] body) Copies the body so later mutation of the input array cannot change the frame.- Parameters:
schemaId- the registry schema ID from the headerbody- the record body that followed the header
-
-
Method Details
-
body
public byte[] body()Returns a copy of the record body.- Returns:
- a fresh copy of the body bytes
-
toString
-
hashCode
-
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 thecomparemethod from their corresponding wrapper classes. -
schemaId
-