THPDFRandomAccessSource.IsRangeAvailable Method
Reports whether the byte range starting at Offset for Count bytes lies completely inside the source size
Declaration
function IsRangeAvailable(Offset, Count: Int64): boolean; virtual;
Unit
HPDFDoc
Parameters
| Name | Purpose |
|---|---|
Offset | Zero-based byte offset of the range start |
Count | Range length in bytes |
Return value
True when both offsets are non-negative and the whole range fits within GetSize, otherwise False
Usage notes
- The base implementation derives the answer from
GetSizealone, so it cannot know whether a truncated remote file has actually delivered the bytes yet - Override this method in custom sources that track arrived byte ranges, for example linearized or partially downloaded input
- Callers such as the linearized redraw scheduler use it to decide when a first-paint or dependency range can be read