Seek

Document management, Performance, Concurrency

Description

Moves the positional cursor used by Read and returns its new absolute offset

The resulting position is clamped to the range from zero to the source total size: a target past the end lands on the end and a target before the start lands on zero

Syntax

Delphi

Function TByteRangeStream.Seek(Const Offset: Int64; Origin: TSeekOrigin): Int64; Override;

Parameters

OffsetThe displacement in bytes relative to Origin
OriginsoBeginning, soCurrent or soEnd

Return values

>=0The new absolute cursor position after clamping

Remarks

Seeking fetches no bytes from the source

An Origin outside the three defined values raises EStreamError

ReadAt neither uses nor changes this cursor

See also

TByteRangeStreamReadAt, TByteRangeStreamAvailability, LoadFromRangeSource