@Override public void setHeaders(HttpURLConnection connection, CloudPageBlob blob, OperationContext context) { if (operationType == PageOperationType.UPDATE) { if (options.getUseTransactionalContentMD5()) { connection.setRequestProperty(Constants.HeaderConstants.CONTENT_MD5, md5); } } }
@Override public void setHeaders(HttpURLConnection connection, CloudBlob blob, OperationContext context) { if (options.getUseTransactionalContentMD5()) { connection.setRequestProperty(Constants.HeaderConstants.CONTENT_MD5, md5); } }
@Override public void setHeaders(HttpURLConnection connection, CloudBlob blob, OperationContext context) { if (options.getUseTransactionalContentMD5()) { connection.setRequestProperty(Constants.HeaderConstants.CONTENT_MD5, md5); } }
@Override public void setHeaders(HttpURLConnection connection, CloudPageBlob blob, OperationContext context) { if (operationType == PageOperationType.UPDATE) { if (options.getUseTransactionalContentMD5()) { connection.setRequestProperty(Constants.HeaderConstants.CONTENT_MD5, md5); } } }
@Override public void setHeaders(HttpURLConnection connection, CloudAppendBlob blob, OperationContext context) { if (options.getUseTransactionalContentMD5()) { connection.setRequestProperty(Constants.HeaderConstants.CONTENT_MD5, md5); } }
@Override public void setHeaders(HttpURLConnection connection, CloudAppendBlob blob, OperationContext context) { if (options.getUseTransactionalContentMD5()) { connection.setRequestProperty(Constants.HeaderConstants.CONTENT_MD5, md5); } }
@Override public void setHeaders(HttpURLConnection connection, CloudBlob blob, OperationContext context) { BlobRequest.addMetadata(connection, blob.metadata, context); if (options.getUseTransactionalContentMD5()) { connection.setRequestProperty(Constants.HeaderConstants.CONTENT_MD5, descriptor.getMd5()); } }
@Override public void setHeaders(HttpURLConnection connection, CloudBlob blob, OperationContext context) { BlobRequest.addMetadata(connection, blob.metadata, context); if (options.getUseTransactionalContentMD5()) { connection.setRequestProperty(Constants.HeaderConstants.CONTENT_MD5, descriptor.getMd5()); } }
options = BlobRequestOptions.populateAndApplyDefaults(options, this.properties.getBlobType(), this.blobServiceClient); if (options.getUseTransactionalContentMD5() && (length != null && length > 4 * Constants.MB)) { throw new IllegalArgumentException(SR.INVALID_RANGE_CONTENT_MD5_HEADER);
if (options.getUseTransactionalContentMD5() && (length != null && length > 4 * Constants.MB)) { throw new IllegalArgumentException(SR.INVALID_RANGE_CONTENT_MD5_HEADER);
/** * Populates any null fields in the first requestOptions object with values from the second requestOptions object. */ private static void populateRequestOptions(BlobRequestOptions modifiedOptions, final BlobRequestOptions clientOptions, final boolean setStartTime) { RequestOptions.populateRequestOptions(modifiedOptions, clientOptions, setStartTime); if (modifiedOptions.getAbsorbConditionalErrorsOnRetry() == null) { modifiedOptions.setAbsorbConditionalErrorsOnRetry(clientOptions.getAbsorbConditionalErrorsOnRetry()); } if (modifiedOptions.getConcurrentRequestCount() == null) { modifiedOptions.setConcurrentRequestCount(clientOptions.getConcurrentRequestCount()); } if (modifiedOptions.getSingleBlobPutThresholdInBytes() == null) { modifiedOptions.setSingleBlobPutThresholdInBytes(clientOptions.getSingleBlobPutThresholdInBytes()); } if (modifiedOptions.getUseTransactionalContentMD5() == null) { modifiedOptions.setUseTransactionalContentMD5(clientOptions.getUseTransactionalContentMD5()); } if (modifiedOptions.getStoreBlobContentMD5() == null) { modifiedOptions.setStoreBlobContentMD5(clientOptions.getStoreBlobContentMD5()); } if (modifiedOptions.getDisableContentMD5Validation() == null) { modifiedOptions.setDisableContentMD5Validation(clientOptions.getDisableContentMD5Validation()); } }
/** * Creates an instance of the <code>BlobRequestOptions</code> class by copying values from another * <code>BlobRequestOptions</code> instance. * * @param other * A {@link BlobRequestOptions} object which represents the blob request options to copy. */ public BlobRequestOptions(final BlobRequestOptions other) { super(other); if (other != null) { this.setAbsorbConditionalErrorsOnRetry(other.getAbsorbConditionalErrorsOnRetry()); this.setConcurrentRequestCount(other.getConcurrentRequestCount()); this.setUseTransactionalContentMD5(other.getUseTransactionalContentMD5()); this.setStoreBlobContentMD5(other.getStoreBlobContentMD5()); this.setDisableContentMD5Validation(other.getDisableContentMD5Validation()); this.setSingleBlobPutThresholdInBytes(other.getSingleBlobPutThresholdInBytes()); } }
if (modifiedOptions.getUseTransactionalContentMD5() == null) { modifiedOptions.setUseTransactionalContentMD5(clientOptions.getUseTransactionalContentMD5());
@Override public HttpURLConnection buildRequest(CloudBlobClient client, CloudBlob blob, OperationContext context) throws Exception { // The first time this is called, we have to set the length and blob offset. On retries, these will already have values and need not be called. if (this.getOffset() == null) { this.setOffset(offsetFinal); } if (this.getLength() == null) { this.setLength(lengthFinal); } AccessCondition tempCondition = (this.getETagLockCondition() != null) ? this.getETagLockCondition() : accessCondition; return BlobRequest.getBlob(blob.getTransformedAddress(context).getUri(this.getCurrentLocation()), options, context, tempCondition, blob.snapshotID, this.getOffset(), this.getLength(), (options.getUseTransactionalContentMD5() && !this.getArePropertiesPopulated())); }
@Override public HttpURLConnection buildRequest(CloudBlobClient client, CloudBlob blob, OperationContext context) throws Exception { // The first time this is called, we have to set the length and blob offset. On retries, these will already have values and need not be called. if (this.getOffset() == null) { this.setOffset(blobOffset); } if (this.getLength() == null) { this.setLength(length); } AccessCondition tempCondition = (this.getETagLockCondition() != null) ? this.getETagLockCondition() : accessCondition; return BlobRequest.getBlob(blob.getTransformedAddress(context).getUri(this.getCurrentLocation()), options, context, tempCondition, blob.snapshotID, this.getOffset(), this.getLength(), (options.getUseTransactionalContentMD5() && !this.getArePropertiesPopulated())); }
/** * Creates an instance of the <code>BlobRequestOptions</code> class by copying values from another * <code>BlobRequestOptions</code> instance. * * @param other * A {@link BlobRequestOptions} object which represents the blob request options to copy. */ public BlobRequestOptions(final BlobRequestOptions other) { super(other); if (other != null) { this.setAbsorbConditionalErrorsOnRetry(other.getAbsorbConditionalErrorsOnRetry()); this.setConcurrentRequestCount(other.getConcurrentRequestCount()); this.setUseTransactionalContentMD5(other.getUseTransactionalContentMD5()); this.setStoreBlobContentMD5(other.getStoreBlobContentMD5()); this.setDisableContentMD5Validation(other.getDisableContentMD5Validation()); this.setSingleBlobPutThresholdInBytes(other.getSingleBlobPutThresholdInBytes()); this.setEncryptionPolicy(other.getEncryptionPolicy()); this.setValidateEncryptionPolicy(other.getValidateEncryptionPolicy()); } }
if (modifiedOptions.getUseTransactionalContentMD5() == null) { modifiedOptions.setUseTransactionalContentMD5(false);
if (modifiedOptions.getUseTransactionalContentMD5() == null) { modifiedOptions.setUseTransactionalContentMD5(false);
if (!options.getDisableContentMD5Validation() && options.getUseTransactionalContentMD5() && Utility.isNullOrEmpty(contentMD5)) { throw new StorageException(StorageErrorCodeStrings.MISSING_MD5_HEADER, SR.MISSING_MD5,
if (!options.getDisableContentMD5Validation() && options.getUseTransactionalContentMD5() && Utility.isNullOrEmpty(contentMD5)) { throw new StorageException(StorageErrorCodeStrings.MISSING_MD5_HEADER, SR.MISSING_MD5,