Partager via


BlobOutputStream Class

public abstract class BlobOutputStream
extends StorageOutputStream

BlobOutputStream allows for the uploading of data to a blob using a stream-like approach.

Method Summary

Modifier and Type Method and Description
static BlobOutputStream blockBlobOutputStream(BlobAsyncClient client, ParallelTransferOptions parallelTransferOptions, BlobHttpHeaders headers, Map<String,String> metadata, AccessTier tier, BlobRequestConditions requestConditions)

Creates a block blob output stream from a BlobAsyncClient

static BlobOutputStream blockBlobOutputStream(BlobAsyncClient client, ParallelTransferOptions parallelTransferOptions, BlobHttpHeaders headers, Map<String,String> metadata, AccessTier tier, BlobRequestConditions requestConditions, Context context)

Creates a block blob output stream from a BlobAsyncClient

static BlobOutputStream blockBlobOutputStream(BlobAsyncClient client, BlockBlobOutputStreamOptions options, Context context)

Creates a block blob output stream from a BlobAsyncClient

synchronized void close()

Closes this output stream and releases any system resources associated with this stream.

Methods inherited from StorageOutputStream

Methods inherited from java.io.OutputStream

Methods inherited from java.lang.Object

Method Details

blockBlobOutputStream

public static BlobOutputStream blockBlobOutputStream(BlobAsyncClient client, ParallelTransferOptions parallelTransferOptions, BlobHttpHeaders headers, Map metadata, AccessTier tier, BlobRequestConditions requestConditions)

Creates a block blob output stream from a BlobAsyncClient

Parameters:

client - BlobAsyncClient The blob client.
parallelTransferOptions - ParallelTransferOptions used to configure buffered uploading.
headers - BlobHttpHeaders
metadata - Metadata to associate with the blob. If there is leading or trailing whitespace in any metadata key or value, it must be removed or encoded.
tier - AccessTier for the destination blob.
requestConditions - BlobRequestConditions

Returns:

BlobOutputStream associated with the blob.

blockBlobOutputStream

public static BlobOutputStream blockBlobOutputStream(BlobAsyncClient client, ParallelTransferOptions parallelTransferOptions, BlobHttpHeaders headers, Map metadata, AccessTier tier, BlobRequestConditions requestConditions, Context context)

Creates a block blob output stream from a BlobAsyncClient

Parameters:

client - BlobAsyncClient The blob client.
parallelTransferOptions - ParallelTransferOptions used to configure buffered uploading.
headers - BlobHttpHeaders
metadata - Metadata to associate with the blob. If there is leading or trailing whitespace in any metadata key or value, it must be removed or encoded.
tier - AccessTier for the destination blob.
requestConditions - BlobRequestConditions
context - Additional context that is passed through the Http pipeline during the service call.

Returns:

BlobOutputStream associated with the blob.

blockBlobOutputStream

public static BlobOutputStream blockBlobOutputStream(BlobAsyncClient client, BlockBlobOutputStreamOptions options, Context context)

Creates a block blob output stream from a BlobAsyncClient

Parameters:

client - BlobAsyncClient The blob client.
context - Additional context that is passed through the Http pipeline during the service call.

Returns:

BlobOutputStream associated with the blob.

close

public synchronized void close()

Closes this output stream and releases any system resources associated with this stream. If any data remains in the buffer it is committed to the service.

Overrides:

BlobOutputStream.close()

Throws:

IOException

- If an I/O error occurs.

Applies to