Delphi Database, Delphi Components from ComponentAce
Products Download Order Contact us



Reads up to Count bytes from the memory stream into Buffer and advances the current position of the stream by the number of bytes read.


function Read(var Buffer; Count: Longint): Longint; override;



Use Read to read the decompressed contents of the memory stream into a buffer, starting at the current position. Read will read up to Count bytes from the current position in memory. If Count bytes extends beyond the end of the memory buffer, Read will only transfer the data up to the end of the associated memory buffer. Read returns the number of bytes actually transferred to Buffer, and advances the current position accordingly. If the return value is less than Count, it means that reading reached the end of the stream data.


All the other data-reading methods of the memory stream (ReadBuffer, ReadComponent) call Read to do the actual reading.


Note:      Read treats Count as an upper bound. The ReadBuffer method, by contrast, raises an exception if Count bytes cannot be read.

        © 2003 - 2020 ComponentAce  | .net zip component | barcode for .net | delphi zip component | delphi database Sep 29, 2020