Table of Contents

Class DigestStream

Namespace
Stride.Core.Storage
Assembly
Stride.Core.Serialization.dll
public class DigestStream : OdbStreamWriter, IAsyncDisposable, IDisposable
Inheritance
DigestStream
Implements
Inherited Members
Extension Methods

Constructors

DigestStream(Stream)

public DigestStream(Stream stream)

Parameters

stream Stream

Properties

CurrentHash

public override ObjectId CurrentHash { get; }

Property Value

ObjectId

Methods

Reset()

public void Reset()

Write(byte[], int, int)

When overridden in a derived class, writes a sequence of bytes to the current stream and advances the current position within this stream by the number of bytes written.

public override void Write(byte[] buffer, int offset, int count)

Parameters

buffer byte[]

An array of bytes. This method copies count bytes from buffer to the current stream.

offset int

The zero-based byte offset in buffer at which to begin copying bytes to the current stream.

count int

The number of bytes to be written to the current stream.

Exceptions

ArgumentException

The sum of offset and count is greater than the buffer length.

ArgumentNullException

buffer is null.

ArgumentOutOfRangeException

offset or count is negative.

IOException

An I/O error occurred, such as the specified file cannot be found.

NotSupportedException

The stream does not support writing.

ObjectDisposedException

Write(byte[], int, int) was called after the stream was closed.

Write(ReadOnlySpan<byte>)

When overridden in a derived class, writes a sequence of bytes to the current stream and advances the current position within this stream by the number of bytes written.

public override void Write(ReadOnlySpan<byte> buffer)

Parameters

buffer ReadOnlySpan<byte>

A region of memory. This method copies the contents of this region to the current stream.

WriteByte(byte)

Writes a byte to the current position in the stream and advances the position within the stream by one byte.

public override void WriteByte(byte value)

Parameters

value byte

The byte to write to the stream.

Exceptions

IOException

An I/O error occurs.

NotSupportedException

The stream does not support writing, or the stream is already closed.

ObjectDisposedException

Methods were called after the stream was closed.