Unified interface for high-performance native buffers.

Variables

read onlyavailable:Int

Bytes currently available for reading.

read onlycapacity:Int

Total capacity of the buffer.

read onlyfreeSpace:Int

Space currently available for writing.

Methods

clear():Void

Clears all data in the buffer.

peekBytes(bytes:Bytes, offset:Int, len:Int):Int

Peeks data without advancing the read pointer.

readBytes(bytes:Bytes, offset:Int, len:Int):Int

Reads data from the buffer into Haxe Bytes. Returns number of bytes actually read.

skip(len:Int):Int

Advances the read pointer without copying data.

writeBytes(bytes:Bytes, offset:Int, len:Int):Int

Writes data from Haxe Bytes to the buffer. Returns number of bytes actually written.