You only need implement the method read and write with these signatures
function Read(var Buffer; Count: Longint): Longint; overload; virtual;
function Write(const Buffer; Count: Longint): Longint
because the overloads versions which uses the TBytes
(and System::DynamicArray<System::Byte>
) as parameter internally calls to the above versions of Read and Write.