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