CBFSFilterStream Type

Syntax

callback.CBFSFilter.CBFSFilterStream

Remarks

The CBFSFilterStream type is returned by some of the CBFilter component's methods. All stream types in CBFS Filter share a common API, inherited from the System.IO.Stream class, documented below.

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

Properties

CanRead Whether the stream supports reading.

public bool CanRead { get; }
Public ReadOnly Property CanRead As Boolean
CanSeek Whether the stream supports seeking.

public bool CanSeek { get; }
Public ReadOnly Property CanSeek As Boolean
CanWrite Whether the stream supports writing.

public bool CanWrite { get; }
Public ReadOnly Property CanWrite As Boolean
Length The length of the stream, in bytes.

public long Length { get; }
Public ReadOnly Property Length As Long
Position Gets or sets the current position within the stream.

public long Position { get; set; }
Public Property Position As Long

Methods

Dispose Releases all resources used by the stream.

public void Dispose();
Public Sub Dispose()
Flush Forces all data held by the stream's buffers to be written out to storage.

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

public int Read(byte[] buffer, int offset, int count);
Public Function Read(ByVal Buffer As Byte(), ByVal Offset As Integer, ByVal Count As Integer) As Integer

Buffer specifies the array of bytes to populate with data from the stream. Offset specifies the offset into Buffer at which to begin storing the 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.

public long Seek(long offset, System.IO.SeekOrigin origin);
Public Function Seek(ByVal Offset As Long, ByVal Origin As System.IO.SeekOrigin) As Long

Offset specifies the offset in the stream to seek to, relative to Origin.

Returns the new position within the stream.

SetLength Sets the length of the current stream.

public void SetLength(long value);
Public Sub SetLength(ByVal Value As Long)

Value specifies the desired length of the stream, in bytes.

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

public void Write(byte[] buffer, int offset, int count);
Public Sub Write(ByVal Buffer As Byte(), ByVal Offset As Integer, ByVal Count As Integer)

Buffer specifies an array of bytes with data to write to the stream. Offset specifies the offset into Buffer at which to begin copying data from. Count specifies the number of bytes that should be written to the stream.

Copyright (c) 2022 Callback Technologies, Inc. - All rights reserved.
CBFS Filter 2020 .NET Edition - Version 20.0 [Build 8317]