Typed Byte Array
A class that provides a typed interface to a byte array.
TypedByteArray allows you to define a structured byte array with named fields of specific types and sizes. It serves as a base class for creating custom byte array structures with convenient property access.
Example usage:
class PersonData : TypedByteArray(
Type("name", DataType.STRING, 50),
Type("age", DataType.BYTE),
Type("height", DataType.SHORT)
) {
var name by string("name")
var age by byte("age")
var height by short("height")
}Content copied to clipboard
Parameters
types
The types that define the structure of the byte array. Each type has a name, a data type, and optionally a size.