RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TStream.ReadBuffer Method

Reads bytes from the stream into Buffer.

Pascal
procedure ReadBuffer(var Buffer; Count: Longint);
C++
__fastcall ReadBuffer( Buffer, Longint Count);

Use ReadBuffer to read Count bytes from the stream into a buffer in cases where the number of bytes is known and fixed, for example when reading in structures. ReadBuffer is used internally for loading from a stream and copying from a stream. 

ReadBuffer calls Read to do the actual reading. If Count bytes cannot be read from the stream, an EReadError exception is raised. 

 

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!