CloudBlockBlob.openOutputStream Method

Definition

Overloads

openOutputStream()

Creates and opens an output stream to write data to the block blob. If the blob already exists on the service, it will be overwritten.

To avoid overwriting and instead throw an error, please use the openOutputStream(AccessCondition, BlobRequestOptions, OperationContext) overload with the appropriate AccessCondition.

openOutputStream(AccessCondition accessCondition, BlobRequestOptions options, OperationContext opContext)

Creates and opens an output stream to write data to the block blob using the specified request options and operation context. If the blob already exists on the service, it will be overwritten.

To avoid overwriting and instead throw an error, please pass in an AccessCondition generated using AccessCondition#generateIfNotExistsCondition().

openOutputStream()

Creates and opens an output stream to write data to the block blob. If the blob already exists on the service, it will be overwritten.

To avoid overwriting and instead throw an error, please use the openOutputStream(AccessCondition, BlobRequestOptions, OperationContext) overload with the appropriate AccessCondition.

public BlobOutputStream openOutputStream()
Returns

A BlobOutputStream object used to write data to the blob.

Exceptions

If a storage service error occurred.

openOutputStream(AccessCondition accessCondition, BlobRequestOptions options, OperationContext opContext)

Creates and opens an output stream to write data to the block blob using the specified request options and operation context. If the blob already exists on the service, it will be overwritten.

To avoid overwriting and instead throw an error, please pass in an AccessCondition generated using AccessCondition#generateIfNotExistsCondition().

public BlobOutputStream openOutputStream(AccessCondition accessCondition, BlobRequestOptions options, OperationContext opContext)
Parameters
accessCondition
AccessCondition

An AccessCondition object that represents the access conditions for the blob.

options
BlobRequestOptions

A BlobRequestOptions object that specifies any additional options for the request. Specifying null will use the default request options from the associated service client ( CloudBlobClient).

opContext
OperationContext

An OperationContext object that represents the context for the current operation. This object is used to track requests to the storage service, and to provide additional runtime information about the operation.

Returns

A BlobOutputStream object used to write data to the blob.

Exceptions

If a storage service error occurred.

Applies to