User Tools

Site Tools


api:dk11:delphi:gisstreams.tgis_stream.readbytescnt_tbytes_integer

Table of Contents

TGIS_Stream.ReadBytesCnt(TBytes; Integer) method

DK11 for Delphi | GisStreams.TGIS_Stream.ReadBytesCnt | Overloads | Constructors | Methods | Properties

Read array of bytes

Available also on: .NET | Java.

Syntax

// Delphi
public
  function ReadBytesCnt(
    const _buf : TBytes;
    const _count : Integer
  ) : Integer; overload;
// C++ Builder
public:
  int ReadBytesCnt(
    TBytes* const _buf,
    const int _count
  ) /* overload */;

Parameters

Name Type Description
_buf TBytes array of bytes; buffer bust be allocated
_count Integer number of bytes to be read

Result

Type Description
Integer Number of read bytes.

Example

Delphi

var
  strm : TGIS_MappedStream ;
  ar   : TBytes ;
begin
  strm := TGIS_MappedStream.Create( 'myfile.bin', False);
  SetLength( ar, 2048 ) ;
  strm.ReadBytes( ar, 2048 ) ;
 
  dosomething();
end;
2020/05/07 01:10

Page Tools