Topic Path: Symbol Reference > Classes > TIdBaseStream Class > TIdBaseStream Methods > Seek Method > Seek Method (Int64, TIdSeekOrigin)
ContentsIndexHome
PreviousUpNext
TIdBaseStream.Seek Method (Int64, TIdSeekOrigin)

Implements seek operations using the platform-specific stream implementation.

function Seek(
    const AOffset: Int64; 
    AOrigin: TIdSeekOrigin
): Int64; override;
Parameters 
Description 
Offset 
Position in the stream to locate relative to the stream origin.
 
Origin 
Stream position to use as the origin for the operation. 

Int64 - Position in the stream found relative to the specified stream origin.

Seek is an overridden method that isolates the platform-specific stream methods required to implement seek operations. Seek relies on the method implementation in a descendant classes for the protected virtual abstract IdSeek method. 

 

On the .Net platform, Seek uses an offest value expresses as an Int64 data type to indicate the position in the stream to locate relative to the stream Origin. 

 

On all other platforms, Seeks uses a Loingint value to indicate the position in the stream to locate relative to the stream Origin. 

Seek calls the IdSeek method in a descendant class to locate a postion using the mechanism required for the platform-specific stream implementation. 

Use Read to input values using a platform-specific stream implementation. 

Use Write to output values to a platform-specific stream implementation.

Copyright 1993-2006, Chad Z. Hower (aka Kudzu) and the Indy Pit Crew. All rights reserved.
Post feedback to the Indy Docs Newsgroup.