System.Classes.TBinaryReader.Read

From RAD Studio API Documentation
Jump to: navigation, search

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 the Index character from a char array Buffer.
  • The third one, which also has 3 parameters, reads Count Bytes starting with Index from a Byte array Buffer.

See Also