public class TransferManager extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
TransferManager.UploadToBlockBlobOptions |
| Constructor and Description |
|---|
TransferManager() |
| Modifier and Type | Method and Description |
|---|---|
static io.reactivex.Single<CommonRestResponse> |
uploadByteBuffersToBlockBlob(Iterable<ByteBuffer> data,
BlockBlobURL blockBlobURL,
TransferManager.UploadToBlockBlobOptions options)
Uploads an iterable of
ByteBuffers to a block blob. |
static io.reactivex.Single<CommonRestResponse> |
uploadByteBufferToBlockBlob(ByteBuffer data,
BlockBlobURL blockBlobURL,
int blockLength,
TransferManager.UploadToBlockBlobOptions options)
Uploads a large ByteBuffer to a block blob in parallel, breaking it up into block-size chunks if necessary.
|
static io.reactivex.Single<CommonRestResponse> |
uploadFileToBlockBlob(FileChannel file,
BlockBlobURL blockBlobURL,
int blockLength,
TransferManager.UploadToBlockBlobOptions options)
Uploads the contents of a file to a block blob in parallel, breaking it into block-size chunks if necessary.
|
public static io.reactivex.Single<CommonRestResponse> uploadFileToBlockBlob(FileChannel file, BlockBlobURL blockBlobURL, int blockLength, TransferManager.UploadToBlockBlobOptions options)
file - The file to upload.blockBlobURL - Points to the blob to which the data should be uploaded.blockLength - If the data must be broken up into blocks, this value determines what size those blocks will be. This will
affect the total number of service requests made. This value will be ignored if the data can be uploaded in
a single put-blob operation. Must be between 1 and BlockBlobURL.MAX_PUT_BLOCK_BYTES. Note as well
that fileLength/blockLength must be less than or equal to BlockBlobURL.MAX_BLOCKS.options - TransferManager.UploadToBlockBlobOptionspublic static io.reactivex.Single<CommonRestResponse> uploadByteBufferToBlockBlob(ByteBuffer data, BlockBlobURL blockBlobURL, int blockLength, TransferManager.UploadToBlockBlobOptions options)
data - The buffer to upload.blockBlobURL - A BlockBlobURL that points to the blob to which the data should be uploaded.blockLength - If the data must be broken up into blocks, this value determines what size those blocks will be. This will
affect the total number of service requests made. This value will be ignored if the data can be uploaded in
a single put-blob operation.options - TransferManager.UploadToBlockBlobOptionspublic static io.reactivex.Single<CommonRestResponse> uploadByteBuffersToBlockBlob(Iterable<ByteBuffer> data, BlockBlobURL blockBlobURL, TransferManager.UploadToBlockBlobOptions options)
ByteBuffers to a block blob. The data will first data will first be examined to
check the size and validate the number of blocks. If the total amount of data in all the buffers is small enough
(i.e. less than or equal to BlockBlobURL.MAX_PUT_BLOB_BYTES, this method will perform a single upload
operation. Otherwise, each ByteBuffer in the iterable is assumed to be its own discreet block of data for
the block blob and will be uploaded as such. Note that in this case, each ByteBuffer must be less than or equal
to BlockBlobURL.MAX_PUT_BLOCK_BYTES. Note as well that there can only be up to
BlockBlobURL.MAX_BLOCKS ByteBuffers in the list.data - The data to upload.blockBlobURL - A BlockBlobURL that points to the blob to which the data should be uploaded.options - TransferManager.UploadToBlockBlobOptionsCopyright © 2018. All rights reserved.