Description | Hierarchy | Fields | Methods | Properties |
type TAdBuffer = class(TObject)
TAdBuffer is class that allows you to buffer data by writing data to the end of the buffer and reading it from the beginning. TAdBuffer is not thread safe, you have to protect every function call with a critical section when using multiple threads.
![]() |
constructor Create; |
![]() |
destructor Destroy; override; |
![]() |
procedure Write(Buf: PByte; Size: Integer; Tag: Cardinal = 0); |
![]() |
function Read(Buf: PByte; Size: Integer): integer; |
![]() |
function Seek(Offset: Integer): Boolean; |
![]() |
procedure Clear; |
![]() |
property Filled: integer read FFilled; |
![]() |
property CurrentTag: Cardinal read FCurrentTag; |
![]() |
constructor Create; |
Creates an instance of TAdBuffer. |
![]() |
destructor Destroy; override; |
Destroys the instance of TAdBuffer. |
![]() |
function Read(Buf: PByte; Size: Integer): integer; |
Reads data from the buffer and returns the count of bytes that were actually read. |
![]() |
procedure Clear; |
Clears the buffer. |
![]() |
property Filled: integer read FFilled; |
Returns the amount of data that is currently in the buffer. |
![]() |
property CurrentTag: Cardinal read FCurrentTag; |
Current tag is the tag you specified in the write method of the last buffer bucket that was read. |