public class TransferManager extends Object
Modifier and Type | Class and Description |
---|---|
static class |
TransferManager.DownloadFromBlobOptions
Configures the parallel download behavior for methods on the
TransferManager . |
static class |
TransferManager.UploadToBlockBlobOptions
Configures the parallel upload behavior for methods on the
TransferManager . |
Modifier and Type | Field and Description |
---|---|
static int |
BLOB_DEFAULT_DOWNLOAD_BLOCK_SIZE
The default size of a download chunk for download large blobs.
|
Constructor and Description |
---|
TransferManager() |
Modifier and Type | Method and Description |
---|---|
static io.reactivex.Single<BlobDownloadHeaders> |
downloadBlobToFile(AsynchronousFileChannel file,
BlobURL blobURL,
BlobRange range,
TransferManager.DownloadFromBlobOptions options)
Downloads a file directly into a file, splitting the download into chunks and parallelizing as necessary.
|
static io.reactivex.Single<CommonRestResponse> |
uploadFileToBlockBlob(AsynchronousFileChannel 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 final int BLOB_DEFAULT_DOWNLOAD_BLOCK_SIZE
public static io.reactivex.Single<CommonRestResponse> uploadFileToBlockBlob(AsynchronousFileChannel file, BlockBlobURL blockBlobURL, int blockLength, TransferManager.UploadToBlockBlobOptions options) throws IOException
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 as each REST request uploads exactly one block in
full. This value will be ignored if the data can be uploaded in a single put-blob operation. Must be
between 1 and BlockBlobURL.MAX_STAGE_BLOCK_BYTES
. Note as well that
fileLength/blockLength
must be less than or equal to BlockBlobURL.MAX_BLOCKS
.options
- TransferManager.UploadToBlockBlobOptions
IOException
public static io.reactivex.Single<BlobDownloadHeaders> downloadBlobToFile(AsynchronousFileChannel file, BlobURL blobURL, BlobRange range, TransferManager.DownloadFromBlobOptions options)
file
- The destination file to which the blob will be written.blobURL
- The URL to the blob to download.range
- BlobRange
options
- TransferManager.DownloadFromBlobOptions
Completable
that will signal when the download is complete.This documentation was released into the public domain.