System.Classes.THandleStream.Read
Delphi
function Read(var Buffer; Count: Longint): Longint; override;
function Read(Buffer: TBytes; Offset, Count: Longint): Longint; override;
C++
virtual int __fastcall Read(void *Buffer, int Count)/* overload */;
virtual int __fastcall Read(System::DynamicArray<System::Byte> Buffer, int Offset, int Count)/* overload */;
inline int __fastcall Read(System::DynamicArray<System::Byte> &Buffer, int Count){ return TStream::Read(Buffer, Count); }
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
function | public | System.Classes.pas System.Classes.hpp |
System.Classes | THandleStream |
Description
Reads up to Count bytes of data from the resource associated with the handle stream into Buffer.
Use Read to read data from the resource associated with the handle stream when the number of bytes in the file is not known. Read transfers up to Count bytes from the resource, starting at the current position, and then advances the current position in the resource by the number of bytes actually transferred. Read returns the number of bytes actually transferred, which may be less than Count if the end of file marker is encountered.
All other data-reading methods of a handle stream (ReadBuffer, ReadComponent) call Read to do the actual reading.
See Also
Code Examples