/** * Creates a new block to be committed as part of a blob where the contents are read from a URL. For more * information, see the <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/put-block-from-url">Azure Docs</a>. * * @param base64BlockID * A Base64 encoded {@code String} that specifies the ID for this block. Note that all block ids for a given * blob must be the same length. * @param sourceURL * The url to the blob that will be the source of the copy. A source blob in the same storage account can be * authenticated via Shared Key. However, if the source is a blob in another account, the source blob must * either be public or must be authenticated via a shared access signature. If the source blob is public, no * authentication is required to perform the operation. * @param sourceRange * {@link BlobRange} * * @return Emits the successful response. * * @apiNote ## Sample Code \n * [!code-java[Sample_Code](../azure-storage-java/src/test/java/com/microsoft/azure/storage/Samples.java?name=block_from_url "Sample code for BlockBlobURL.stageBlockFromURL")] * For more samples, please see the [Samples file](%https://github.com/Azure/azure-storage-java/blob/master/src/test/java/com/microsoft/azure/storage/Samples.java) */ public Single<BlockBlobStageBlockFromURLResponse> stageBlockFromURL(String base64BlockID, URL sourceURL, BlobRange sourceRange) { return this.stageBlockFromURL(base64BlockID, sourceURL, sourceRange, null, null, null); }
/** * Creates a new block to be committed as part of a blob where the contents are read from a URL. For more * information, see the <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/put-block-from-url">Azure Docs</a>. * * @param base64BlockID * A Base64 encoded {@code String} that specifies the ID for this block. Note that all block ids for a given * blob must be the same length. * @param sourceURL * The url to the blob that will be the source of the copy. A source blob in the same storage account can be * authenticated via Shared Key. However, if the source is a blob in another account, the source blob must * either be public or must be authenticated via a shared access signature. If the source blob is public, no * authentication is required to perform the operation. * @param sourceRange * {@link BlobRange} * * @return Emits the successful response. * * @apiNote ## Sample Code \n * [!code-java[Sample_Code](../azure-storage-java/src/test/java/com/microsoft/azure/storage/Samples.java?name=block_from_url "Sample code for BlockBlobURL.stageBlockFromURL")] * For more samples, please see the [Samples file](%https://github.com/Azure/azure-storage-java/blob/master/src/test/java/com/microsoft/azure/storage/Samples.java) */ public Single<BlockBlobStageBlockFromURLResponse> stageBlockFromURL(String base64BlockID, URL sourceURL, BlobRange sourceRange) { return this.stageBlockFromURL(base64BlockID, sourceURL, sourceRange, null, null, null); }