[Overview][Constants][Types][Classes][Procedures and functions] Reference for unit 'idea' (#fcl)

TIDEADeCryptStream.Seek

Set position on the stream

Declaration

Source position: idea.pp line 98

public function TIDEADeCryptStream.Seek(

  Offset: LongInt;

  Origin: Word

):LongInt; override;

Arguments

Offset

  

Offset to apply to the position in the stream

Origin

  

Origin from where Offsetshould be counted.

Function result

New position in the stream

Description

Seekwill only work on a forward seek. It emulates a forward seek by reading and discarding bytes from the input stream. The TIDEADecryptStreamstream tries to provide seek capabilities for the following limited number of cases:

Origin=soFromBeginning
If Offsetis larger than the current position, then the remaining bytes are skipped by reading them from the stream and discarding them.
Origin=soFromCurrent
If Offsetis zero, the current position is returned. If it is positive, then Offsetbytes are skipped by reading them from the stream and discarding them.

Errors

An EIDEAErrorexception is raised if the stream does not allow the requested seek operation.

See also

Read

  

Reads data from the stream, decrypting it as needed