VERTRIEB: 1-800-867-1380

CloudBlob.DownloadToStream-Methode (Stream, BlobRequestOptions)

Downloads the contents of a blob to a stream.

Namespace: Microsoft.WindowsAzure.StorageClient
Assembly: Microsoft.WindowsAzure.StorageClient (in microsoft.windowsazure.storageclient.dll)

'Usage
Dim instance As CloudBlob
Dim target As Stream
Dim options As BlobRequestOptions

instance.DownloadToStream(target, options)

public void DownloadToStream (
	Stream target,
	BlobRequestOptions options
)
public void DownloadToStream (
	Stream target, 
	BlobRequestOptions options
)
public function DownloadToStream (
	target : Stream, 
	options : BlobRequestOptions
)

Parameter

target

The target stream.

options

An object that specifies any additional options for the request.

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);
}


Alle öffentlichen statischen (freigegebenen in Visual Basic) Member dieses Typs sind threadsicher. Bei Instanzmembern ist die Threadsicherheit nicht gewährleistet.

Entwicklungsplattformen

Windows XP Home Edition, Windows XP Professional, Windows Server 2003, Windows Server 2008 und Windows 2000

Zielplattformen

Fanden Sie dies hilfreich?
(1500 verbleibende Zeichen)
Vielen Dank für Ihr Feedback.

Community-Beiträge

Anzeigen:
© 2014 Microsoft