/** * Uploads the specified block to the block blob's "staging area" to be later committed by a call to * commitBlockList. For more information, see the * <a href="https://docs.microsoft.com/rest/api/storageservices/put-block">Azure Docs</a>. * <p> * Note that the data passed must be replayable if retries are enabled (the default). In other words, the * {@code Flowable} must produce the same data each time it is subscribed to. * * @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 data * The data to write to the block. Note that this {@code Flowable} must be replayable if retries are enabled * (the default). In other words, the Flowable must produce the same data each time it is subscribed to. * @param length * The exact length of the data. It is important that this value match precisely the length of the data * emitted by the {@code Flowable}. * * @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=blocks "Sample code for BlockBlobURL.stageBlock")] \n * 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<BlockBlobStageBlockResponse> stageBlock(String base64BlockID, Flowable<ByteBuffer> data, long length) { return this.stageBlock(base64BlockID, data, length, null, null); }
/** * Uploads the specified block to the block blob's "staging area" to be later committed by a call to * commitBlockList. For more information, see the * <a href="https://docs.microsoft.com/rest/api/storageservices/put-block">Azure Docs</a>. * <p> * Note that the data passed must be replayable if retries are enabled (the default). In other words, the * {@code Flowable} must produce the same data each time it is subscribed to. * * @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 data * The data to write to the block. Note that this {@code Flowable} must be replayable if retries are enabled * (the default). In other words, the Flowable must produce the same data each time it is subscribed to. * @param length * The exact length of the data. It is important that this value match precisely the length of the data * emitted by the {@code Flowable}. * * @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=blocks "Sample code for BlockBlobURL.stageBlock")] \n * 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<BlockBlobStageBlockResponse> stageBlock(String base64BlockID, Flowable<ByteBuffer> data, long length) { return this.stageBlock(base64BlockID, data, length, null, null); }
return blockBlobURL.stageBlock(blockId, data, count, optionsReal.accessConditions().leaseAccessConditions(), null) .map(x -> blockId).toObservable();
return blockBlobURL.stageBlock(blockId, data, count, optionsReal.accessConditions().leaseAccessConditions(), null) .map(x -> blockId).toObservable();