I want to download a large size blob from Azure blob storage. Let's say my blob size is 2 GB. I want to get the progress of the download in percentage using java-sdk
so that I can show some pretty progress bar. I am using following code to download the blob
BlobServiceClient blobServiceClient = new BlobServiceClientBuilder().connectionString("connectionString").buildClient();
BlobContainerClient blobContainerClient = blobServiceClient.getBlobContainerClient("cloudDirectoryName");
BlobClient blobClient = blobContainerClient.getBlobClient(fileName);
BlobRange range = new BlobRange(1024, 2048L);
DownloadRetryOptions options = new DownloadRetryOptions().setMaxRetryRequests(5);
blobClient.downloadToFileWithResponse(filePath, null, new ParallelTransferOptions(4 * Constants.MB, null, null),
options, null, false, null, null);