Azure.Storage.BlobStorageAsync.GetBlockBlobDataAsStreamAsync C# (CSharp) Method

GetBlockBlobDataAsStreamAsync() public method

Returns as stream with the contents of a block blob with the given blob name
public GetBlockBlobDataAsStreamAsync ( string blobId ) : Task
blobId string
return Task
	    public async Task<Stream> GetBlockBlobDataAsStreamAsync(string blobId)
	    {
            Validate.BlobName(blobId, "blobId");

            var blob = cloudBlobContainer.GetBlockBlobReference(blobId);
            var stream = new MemoryStream();
            await blob.DownloadToStreamAsync(stream);
            stream.Seek(0, SeekOrigin.Begin);

            return stream;
	    }