CBFS Vault 2020 Delphi Edition

Questions / Feedback?

CBFSVaultStream Type

Syntax

cbvcore.TCBFSVaultStream

Remarks

The CBFSVaultStream type is returned by some of the CBVault component's methods. All stream types in CBFS Vault share a common API, inherited from the System.Classes.TStream class, documented below.

Note that, for brevity, many of the properties and methods offered by System.Classes.TStream are not documented here; please refer to Embarcadero's documentation for more information.

Properties

Position Gets or sets the current position within the stream.

property Position: Int64 read GetPosition write SetPosition;
Size Gets or sets the length of the stream, in bytes.

property Size: Int64 read GetSize write SetSize64;

Methods

Flush Forces all data held by the stream's buffers to be written out to storage.

procedure Flush();
Read Reads a sequence of bytes from the stream and advances the current position within the stream by the number of bytes read.

function Read(var Buffer; Count: Longint): Longint;

Buffer specifies the buffer to populate with data from the stream. Count specifies the number of bytes that should be read from the stream.

Returns the total number of bytes read into Buffer. This may be less than Count if that many bytes are not currently available, or may be 0 if the end of the stream has been reached.

Seek Sets the current position within the stream based on a particular point of origin.

function Seek(const Offset: Int64; Origin: TSeekOrigin): Int64;

Offset specifies the offset in the stream to seek to, relative to Origin, which must be one of the values described by the TStream.Seek documentation.

Returns the new position within the stream.

Write Writes a sequence of bytes to the stream and advances the current position within the stream by the number of bytes written.

function Write(const Buffer; Count: Longint): Longint;

Buffer specifies the buffer with data to write to the stream. Count specifies the number of bytes that should be written to the stream.

Returns the total number of bytes written to the stream.

Copyright (c) 2021 Callback Technologies, Inc. - All rights reserved.
CBFS Vault 2020 Delphi Edition - Version 20.0 [Build 7982]