Let's say there is blob in Azure Blob Storage, which I want to download as byte[]. This can be achieved by getting the reference to the blob and downloading as shown below in the below snippet:
CloudBlobContainer container = getCloudBlobContainer(containerName);
CloudBlockBlob blob = container.getBlockBlobReference(blobName);
Now I can use blob.downloadToByteArray(byte[] buffer, int bufferOffset)
I have gone through some links where it is suggested that buffer is to be initialised with the size which is more than sum of the blob size and bufferOffset. Now bufferOffset will be 0 but how do I derive stored blob size. Any suggestion here.
downloadToFile
method :docs.microsoft.com/en-us/java/api/… – Jim Xu