IsRangeAvailable

Document parts, variable data, document editing

Description

Reports whether a requested byte range lies inside the announced size of a TCallbackByteRangeSource and is available from the availability callback

Syntax

Function TCallbackByteRangeSource.IsRangeAvailable(
  StartOffset: Int64; Count: LongInt): Boolean;

Parameters

StartOffsetZero-based offset of the first requested byte
CountRequested number of bytes

Remarks

When no availability callback was supplied, every range that fits the total size is reported as available without any callback invocation

The method never invokes the read callback and never reads data

An exception raised by the availability callback is caught and reported as unavailable

Return values

TrueThe range lies fully within the total size and the availability callback reported it as available
FalseThe offset or count is negative, the range extends past the total size, the availability callback reported the range unavailable, or the callback raised an exception

See also

ReadRange, GetTotalSize, GetRangeSupported, GetLastError, LoadFromRangeSource