CloudBlob.downloadRangeToByteArray Method

Definition

Overloads

downloadRangeToByteArray(final long offset, final Long length, final byte[] buffer, final int bufferOffset)

Downloads a range of bytes from the blob to the given byte buffer.

downloadRangeToByteArray(final long offset, final Long length, final byte[] buffer, final int bufferOffset, final AccessCondition accessCondition, BlobRequestOptions options, OperationContext opContext)

Downloads a range of bytes from the blob to the given byte buffer, using the specified request options and operation context.

downloadRangeToByteArray(final long offset, final Long length, final byte[] buffer, final int bufferOffset)

Downloads a range of bytes from the blob to the given byte buffer.

public final int downloadRangeToByteArray(final long offset, final Long length, final byte[] buffer, final int bufferOffset)
Parameters
offset
final long

A long which represents the byte offset to use as the starting point for the source.

length
final Long

A Long which represents the number of bytes to read or null.

buffer
final byte []

A byte array which represents the buffer to which the blob bytes are downloaded.

bufferOffset
final int

An int which represents the byte offset to use as the starting point for the target.

Returns
final int

The total number of bytes read into the buffer.

Exceptions
StorageException

downloadRangeToByteArray(final long offset, final Long length, final byte[] buffer, final int bufferOffset, final AccessCondition accessCondition, BlobRequestOptions options, OperationContext opContext)

Downloads a range of bytes from the blob to the given byte buffer, using the specified request options and operation context.

public final int downloadRangeToByteArray(final long offset, final Long length, final byte[] buffer, final int bufferOffset, final AccessCondition accessCondition, BlobRequestOptions options, OperationContext opContext)
Parameters
offset
final long

A long which represents the byte offset to use as the starting point for the source.

length
final Long

A Long which represents the number of bytes to read or null.

buffer
final byte []

A byte array which represents the buffer to which the blob bytes are downloaded.

bufferOffset
final int

An int which represents the byte offset to use as the starting point for the target.

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.

Returns
final int

The total number of bytes read into the buffer.

Exceptions
StorageException

If a storage service error occurred.

Applies to