Package com.azure.storage.blob.options
Class BlockBlobSimpleUploadOptions
java.lang.Object
com.azure.storage.blob.options.BlockBlobSimpleUploadOptions
Extended options that may be passed when uploading a Block Blob in a single request.
-
Constructor Summary
ConstructorDescriptionBlockBlobSimpleUploadOptions
(com.azure.core.util.BinaryData data) BlockBlobSimpleUploadOptions
(InputStream data, long length) BlockBlobSimpleUploadOptions
(Flux<ByteBuffer> data, long length) -
Method Summary
Modifier and TypeMethodDescriptionbyte[]
com.azure.core.util.BinaryData
getData()
long
getTags()
getTier()
setContentMd5
(byte[] contentMd5) setHeaders
(BlobHttpHeaders headers) setImmutabilityPolicy
(BlobImmutabilityPolicy immutabilityPolicy) Note that this parameter is only applicable to a blob within a container that has immutable storage with versioning enabled.setLegalHold
(Boolean legalHold) Note that this parameter is only applicable to a blob within a container that has immutable storage with versioning enabled.setMetadata
(Map<String, String> metadata) setRequestConditions
(BlobRequestConditions requestConditions) setTier
(AccessTier tier)
-
Constructor Details
-
BlockBlobSimpleUploadOptions
public BlockBlobSimpleUploadOptions(com.azure.core.util.BinaryData data) - Parameters:
data
- The data to write to the block. Note that thisBinaryData
must have defined length and must be replayable if retries are enabled (the default), seeBinaryData.isReplayable()
.
-
BlockBlobSimpleUploadOptions
- Parameters:
data
- The data to write to the blob. Note that thisFlux
must be replayable if retries are enabled (the default). In other words, the Flux must produce the same data each time it is subscribed to.length
- The exact length of the data. It is important that this value match precisely the length of the data emitted by the data source.
-
BlockBlobSimpleUploadOptions
- Parameters:
data
- The data to write to the blob.length
- The exact length of the data. It is important that this value match precisely the length of the data emitted by the data source.
-
-
Method Details
-
getDataFlux
- Returns:
- The data to write to the blob. Note that this
Flux
must be replayable if retries are enabled (the default). In other words, the Flux must produce the same data each time it is subscribed to.
-
getDataStream
- Returns:
- The data to write to the blob.
-
getData
public com.azure.core.util.BinaryData getData()- Returns:
- The data to write to the blob.
-
getLength
public long getLength()- Returns:
- The exact length of the data. It is important that this value match precisely the length of the data emitted by the data source.
-
getHeaders
- Returns:
BlobHttpHeaders
-
setHeaders
- Parameters:
headers
-BlobHttpHeaders
- Returns:
- The updated options
-
getMetadata
- Returns:
- The metadata to associate with the blob.
-
setMetadata
- Parameters:
metadata
- The metadata to associate with the blob.- Returns:
- The updated options
-
getTags
- Returns:
- The tags to associate with the blob.
-
setTags
- Parameters:
tags
- The tags to associate with the blob.- Returns:
- The updated options.
-
getTier
- Returns:
AccessTier
-
setTier
- Parameters:
tier
-AccessTier
- Returns:
- The updated options.
-
getContentMd5
public byte[] getContentMd5()- Returns:
- An MD5 hash of the content. This hash is used to verify the integrity of the content during transport. When this header is specified, the storage service compares the hash of the content that has arrived with this header value. Note that this MD5 hash is not stored with the blob. If the two hashes do not match, the operation will fail.
-
setContentMd5
- Parameters:
contentMd5
- An MD5 hash of the block content. This hash is used to verify the integrity of the block during transport. When this header is specified, the storage service compares the hash of the content that has arrived with this header value. Note that this MD5 hash is not stored with the blob. If the two hashes do not match, the operation will fail.- Returns:
- The updated options
-
getRequestConditions
- Returns:
BlobRequestConditions
-
setRequestConditions
- Parameters:
requestConditions
-BlobRequestConditions
- Returns:
- The updated options.
-
getImmutabilityPolicy
- Returns:
BlobImmutabilityPolicy
-
setImmutabilityPolicy
public BlockBlobSimpleUploadOptions setImmutabilityPolicy(BlobImmutabilityPolicy immutabilityPolicy) Note that this parameter is only applicable to a blob within a container that has immutable storage with versioning enabled.- Parameters:
immutabilityPolicy
-BlobImmutabilityPolicy
- Returns:
- The updated options.
-
isLegalHold
- Returns:
- If a legal hold should be placed on the blob.
-
setLegalHold
Note that this parameter is only applicable to a blob within a container that has immutable storage with versioning enabled.- Parameters:
legalHold
- Indicates if a legal hold should be placed on the blob.- Returns:
- The updated options.
-