Record Class BlockfileBlockHeader
java.lang.Object
java.lang.Record
io.datarouter.bytes.blockfile.block.common.BlockfileBlockHeader
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionBlockfileBlockHeader(int length, BlockfileBlockType blockType) Creates an instance of aBlockfileBlockHeaderrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theblockTyperecord component.static BlockfileBlockHeaderdecode(byte[] bytes) static BlockfileBlockHeaderdecode(byte[] bytes, int offset) static BlockfileBlockHeaderdecode(InputStream inputStream) byte[]encode()voidencode(byte[] bytes) intencode(byte[] bytes, int offset) final booleanIndicates whether some other object is "equal to" this one.intfinal inthashCode()Returns a hash code value for this object.intlength()Returns the value of thelengthrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
LENGTH
public static final int LENGTH- See Also:
-
-
Constructor Details
-
BlockfileBlockHeader
Creates an instance of aBlockfileBlockHeaderrecord class.- Parameters:
length- the value for thelengthrecord componentblockType- the value for theblockTyperecord component
-
-
Method Details
-
fullBlockLength
public int fullBlockLength() -
encode
public int encode(byte[] bytes, int offset) -
encode
public void encode(byte[] bytes) -
encode
public byte[] encode() -
decode
-
decode
-
decode
-
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 '=='. -
length
public int length()Returns the value of thelengthrecord component.- Returns:
- the value of the
lengthrecord component
-
blockType
Returns the value of theblockTyperecord component.- Returns:
- the value of the
blockTyperecord component
-