Azure.Storage.BlobStorage.GetBlockBlobDataAsStream C# (CSharp) Method

GetBlockBlobDataAsStream() public method

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

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

            return stream;
	    }