CloudBlockBlob.uploadBlock Method

Definition

Overloads

uploadBlock(final String blockId, final InputStream sourceStream, final long length)

Uploads a block to be committed as part of the block blob, using the specified block ID.

uploadBlock(final String blockId, final InputStream sourceStream, final long length, final AccessCondition accessCondition, BlobRequestOptions options, OperationContext opContext)

Uploads a block to be committed as part of the block blob, using the specified block ID, the specified lease ID, request options, and operation context.

uploadBlock(final String blockId, final InputStream sourceStream, final long length)

Uploads a block to be committed as part of the block blob, using the specified block ID.

public void uploadBlock(final String blockId, final InputStream sourceStream, final long length)
Parameters
blockId
final String

A String that represents the Base-64 encoded block ID. Note for a given blob the length of all Block IDs must be identical.

sourceStream
final InputStream

An InputStream object that represents the input stream to write to the block blob.

length
final long

A long which represents the length, in bytes, of the stream data, or -1 if unknown.

Exceptions
IOException

If an I/O error occurred.

If a storage service error occurred.

uploadBlock(final String blockId, final InputStream sourceStream, final long length, final AccessCondition accessCondition, BlobRequestOptions options, OperationContext opContext)

Uploads a block to be committed as part of the block blob, using the specified block ID, the specified lease ID, request options, and operation context.

public void uploadBlock(final String blockId, final InputStream sourceStream, final long length, final AccessCondition accessCondition, BlobRequestOptions options, OperationContext opContext)
Parameters
blockId
final String

A String that represents the Base-64 encoded block ID. Note for a given blob the length of all Block IDs must be identical.

sourceStream
final InputStream

An InputStream object that represents the input stream to write to the block blob.

length
final long

A long which represents the length, in bytes, of the stream data, or -1 if unknown.

accessCondition
final 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.

Exceptions
IOException

If an I/O error occurred.

If a storage service error occurred.

Applies to