Table of Contents

Class CloudBlobStream

Namespace
Microsoft.WindowsAzure.Storage.Blob
Assembly
Microsoft.WindowsAzure.Storage.dll

Represents a stream for writing to a blob.

public abstract class CloudBlobStream : Stream, IDisposable, IAsyncDisposable
Inheritance
CloudBlobStream
Implements
Inherited Members

Constructors

CloudBlobStream()

protected CloudBlobStream()

Methods

BeginCommit(AsyncCallback, object)

Begins an asynchronous commit operation.

public abstract ICancellableAsyncResult BeginCommit(AsyncCallback callback, object state)

Parameters

callback AsyncCallback

An optional asynchronous callback, to be called when the commit is complete.

state object

A user-provided object that distinguishes this particular asynchronous commit request from other requests.

Returns

ICancellableAsyncResult

An ICancellableAsyncResult that represents the asynchronous commit, which could still be pending.

BeginFlush(AsyncCallback, object)

Begins an asynchronous flush operation.

public abstract ICancellableAsyncResult BeginFlush(AsyncCallback callback, object state)

Parameters

callback AsyncCallback

An optional asynchronous callback, to be called when the flush is complete.

state object

A user-provided object that distinguishes this particular asynchronous flush request from other requests.

Returns

ICancellableAsyncResult

An ICancellableAsyncResult that represents the asynchronous flush, which could still be pending.

Commit()

Clears all buffers for this stream, causes any buffered data to be written to the underlying blob, and commits the blob.

public abstract void Commit()

EndCommit(IAsyncResult)

Waits for the pending asynchronous commit to complete.

public abstract void EndCommit(IAsyncResult asyncResult)

Parameters

asyncResult IAsyncResult

An IAsyncResult object containing a reference to the pending asynchronous request to finish.

EndFlush(IAsyncResult)

Waits for the pending asynchronous flush to complete.

public abstract void EndFlush(IAsyncResult asyncResult)

Parameters

asyncResult IAsyncResult

An IAsyncResult object containing a reference to the pending asynchronous request to finish.