System.Classes.TBinaryReader.Read
Delphi
function Read: Integer; overload; virtual;
function Read(var Buffer: TCharArray; Index, Count: Integer): Integer; overload; virtual;
function Read(const Buffer: TBytes; Index, Count: Integer): Integer; overload; virtual;
C++
virtual int __fastcall Read()/* overload */;
virtual int __fastcall Read(System::DynamicArray<System::WideChar> &Buffer, int Index, int Count)/* overload */;
virtual int __fastcall Read(const System::DynamicArray<System::Byte> Buffer, int Index, int Count)/* overload */;
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
function | public | System.Classes.pas System.Classes.hpp |
System.Classes | TBinaryReader |
Description
Reads data from the the underlying stream. Use Read to read data from the stream.
There are 3 overloaded Read methods:
- The first one, which is parameterless, reads the next character from the underlying stream, advances to the current position, and returns it. If there is no character to read, the method returns -1.
- The second one, which has 3 parameters, reads
Count
characters starting at theIndex
character from a char arrayBuffer
. - The third one, which also has 3 parameters, reads
Count
Bytes starting withIndex
from a Byte arrayBuffer
.