CloudBlockBlob.upload Method

Definition

Overloads

upload(final InputStream sourceStream, final long length)

Uploads the source stream data to the block blob. If the blob already exists on the service, it will be overwritten.

upload(final InputStream sourceStream, final long length, final AccessCondition accessCondition, BlobRequestOptions options, OperationContext opContext)

Uploads the source stream data to the blob, using the specified lease ID, request options, and operation context. If the blob already exists on the service, it will be overwritten.

upload(final InputStream sourceStream, final long length)

Uploads the source stream data to the block blob. If the blob already exists on the service, it will be overwritten.

public void upload(final InputStream sourceStream, final long length)
Parameters
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.

upload(final InputStream sourceStream, final long length, final AccessCondition accessCondition, BlobRequestOptions options, OperationContext opContext)

Uploads the source stream data to the blob, using the specified lease ID, request options, and operation context. If the blob already exists on the service, it will be overwritten.

public void upload(final InputStream sourceStream, final long length, final AccessCondition accessCondition, BlobRequestOptions options, OperationContext opContext)
Parameters
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