Indy 9
|
TIdReadMemoryStream = class(TCustomMemoryStream)
TIdReadMemoryStream is used internally in the implementation of some Indy methods like TIdEncoder.Encode, TIdHash32.HashValue, TIdHash16.HashValue, and TIdHash128.HashValue.
procedure SetPointer(Ptr: Pointer; Size: Longint);
Ptr is as pointer to the internal buffer to be assigned to Memory. Size is the number of bytes allocated to the buffer in Ptr.
SetPointer sets the Position of the memory stream to byte 0 (zero) using Seek prior to exiting the method.
Note: SetPointer does not free the existing value of Memory, if any, when it replaces the memory buffer. Descendant classes that use SetPointer to replace an existing stream memory pool should free the memory pointed to by the Memory property before calling SetPointer to replace the memory buffer.
function Write(const Buffer; Count: Longint): Longint; override;