匯出 (0) 列印
全部展開

CloudBlob.DownloadToStream 方法 (Stream)

Downloads the contents of a blob to a stream.

命名空間: Microsoft.WindowsAzure.StorageClient
組件: Microsoft.WindowsAzure.StorageClient (在 microsoft.windowsazure.storageclient.dll 中)

'用途
Dim instance As CloudBlob
Dim target As Stream

instance.DownloadToStream(target)

public void DownloadToStream (
	Stream target
)
public void DownloadToStream (
	Stream target
)
public function DownloadToStream (
	target : Stream
)

參數

target

The target stream.

The following code example appends the contents of a text blob to a local text file.

static void AppendTextBlobToFile(Uri blobEndpoint, string accountName, string accountKey)
{
    //Create service client for credentialed access to the Blob service.
    CloudBlobClient blobClient = new CloudBlobClient(blobEndpoint, new StorageCredentialsAccountAndKey(accountName, accountKey));

    //Get a reference to a blob.
    CloudBlob blob = blobClient.GetBlobReference("mycontainer/myblob.txt");
    //Download the blob to a file stream.
    FileStream stream = new FileStream("C:\\appendtofile.txt", FileMode.Append);
    blob.DownloadToStream(stream);
}


任何這個類型的公用靜態 (在 Visual Basic 中為 Shared) 成員都具備執行緒安全。 並非所有的執行個體成員都是安全執行緒。

開發平台

Windows XP Home Edition, Windows XP Professional, Windows Server 2003、Windows Server 2008 和 Windows 2000

目標平台

社群新增項目

顯示:
© 2014 Microsoft