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
StartOffset | Zero-based offset of the first requested byte |
|---|---|
Count | Requested 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
True | The range lies fully within the total size and the availability callback reported it as available |
|---|---|
False | The 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