public class CreateBlobOptions extends BlobServiceOptions
createPageBlob or
createBlockBlob request. These options include an optional server timeout
for the operation, the MIME content type and content encoding for the blob,
the content language, the MD5 hash, a cache control value, blob metadata, a
blob lease ID, a sequence number, and access conditions.| Constructor and Description |
|---|
CreateBlobOptions() |
| Modifier and Type | Method and Description |
|---|---|
CreateBlobOptions |
addMetadata(String key,
String value)
Adds a name-value pair to the blob metadata collection associated with
this
CreateBlobOptions instance. |
com.microsoft.windowsazure.core.utils.AccessConditionHeader |
getAccessCondition()
Gets the access conditions set in this
CreateBlobOptions
instance. |
String |
getBlobCacheControl()
Gets the
x-ms-blob-cache-control header value set in this
CreateBlobOptions instance. |
String |
getBlobContentEncoding()
Gets the
x-ms-blob-content-encoding header value set in this
CreateBlobOptions instance. |
String |
getBlobContentLanguage()
Gets the
x-ms-blob-content-language header value set in this
CreateBlobOptions instance. |
String |
getBlobContentMD5()
Gets the
x-ms-blob-content-md5 header value set in this
CreateBlobOptions instance. |
String |
getBlobContentType()
Gets the
x-ms-blob-content-type header value set in this
CreateBlobOptions instance. |
String |
getCacheControl()
Gets the
Cache-Control header value set in this
CreateBlobOptions instance. |
String |
getContentEncoding()
Gets the
Content-Encoding header value set in this
CreateBlobOptions instance. |
String |
getContentLanguage()
Gets the
Content-Language header value set in this
CreateBlobOptions instance. |
String |
getContentMD5()
Gets the
Content-MD5 header value set in this
CreateBlobOptions instance. |
String |
getContentType()
Gets the
Content-Type header value set in this
CreateBlobOptions instance. |
String |
getLeaseId()
Gets the lease ID for the blob set in this
CreateBlobOptions
instance. |
HashMap<String,String> |
getMetadata()
Gets the blob metadata collection set in this
CreateBlobOptions
instance. |
Long |
getSequenceNumber()
Gets the sequence number set in this
CreateBlobOptions instance. |
CreateBlobOptions |
setAccessCondition(com.microsoft.windowsazure.core.utils.AccessConditionHeader accessCondition)
Sets the access conditions for updating a blob.
|
CreateBlobOptions |
setBlobCacheControl(String blobCacheControl)
Sets the optional
x-ms-blob-cache-control header value for
the blob content. |
CreateBlobOptions |
setBlobContentEncoding(String blobContentEncoding)
Sets the optional
x-ms-blob-content-encoding header value
for the blob content. |
CreateBlobOptions |
setBlobContentLanguage(String blobContentLanguage)
Sets the optional
x-ms-blob-content-language header value
for the blob content. |
CreateBlobOptions |
setBlobContentMD5(String blobContentMD5)
Sets the optional MD5 hash value for the blob content.
|
CreateBlobOptions |
setBlobContentType(String blobContentType)
Sets the optional
x-ms-blob-content-type header value for
the blob content. |
CreateBlobOptions |
setCacheControl(String cacheControl)
Sets the optional
Cache-Control header value for the blob
content. |
CreateBlobOptions |
setContentEncoding(String contentEncoding)
Sets the optional
Content-Encoding header value for the blob
content. |
CreateBlobOptions |
setContentLanguage(String contentLanguage)
Sets the optional
Content-Language header value for the blob
content. |
CreateBlobOptions |
setContentMD5(String contentMD5)
Sets the optional
Content-MD5 header value for the blob
content. |
CreateBlobOptions |
setContentType(String contentType)
Sets the optional
Content-Type header value for the blob
content. |
CreateBlobOptions |
setLeaseId(String leaseId)
Sets a lease ID value to match when updating the blob.
|
CreateBlobOptions |
setMetadata(HashMap<String,String> metadata)
Sets the blob metadata collection to associate with the created blob.
|
CreateBlobOptions |
setSequenceNumber(Long sequenceNumber)
Sets the optional sequence number for a page blob in this
CreateBlobOptions instance. |
CreateBlobOptions |
setTimeout(Integer timeout)
Sets the optional server request timeout value associated with this
CreateBlobOptions instance. |
getTimeoutpublic CreateBlobOptions setTimeout(Integer timeout)
CreateBlobOptions instance.
The timeout value only affects calls made on methods where this
CreateBlobOptions instance is passed as a parameter.
setTimeout in class BlobServiceOptionstimeout - The server request timeout value to set in milliseconds.CreateBlobOptions instance.public String getContentType()
Content-Type header value set in this
CreateBlobOptions instance.String containing the Content-Type header
value set, if any.public CreateBlobOptions setContentType(String contentType)
Content-Type header value for the blob
content. This value will be returned to clients in the headers of the
response when the blob data or blob properties are requested. If no
content type is specified, the default content type is
application/octet-stream.contentType - A String containing the Content-Type
header value to set.CreateBlobOptions instance.public String getContentEncoding()
Content-Encoding header value set in this
CreateBlobOptions instance.String containing the Content-Encoding
header value set, if any.public CreateBlobOptions setContentEncoding(String contentEncoding)
Content-Encoding header value for the blob
content. Use this value to specify the content encodings applied to the
blob. This value will be returned to clients in the headers of the
response when the blob data or blob properties are requested.
Note that this value only affects calls made on methods where this
CreateBlobOptions instance is passed as a parameter.
contentEncoding - A String containing the Content-Encoding
header value to set.CreateBlobOptions instance.public String getContentLanguage()
Content-Language header value set in this
CreateBlobOptions instance.String containing the Content-Language
header value set, if any.public CreateBlobOptions setContentLanguage(String contentLanguage)
Content-Language header value for the blob
content. Use this value to specify the content language of the blob. This
value will be returned to clients in the headers of the response when the
blob data or blob properties are requested.
Note that this value only affects calls made on methods where this
CreateBlobOptions instance is passed as a parameter.
contentLanguage - A String containing the Content-Language
header value to set.CreateBlobOptions instance.public String getContentMD5()
Content-MD5 header value set in this
CreateBlobOptions instance.String containing the Content-MD5 header
value set, if any.public CreateBlobOptions setContentMD5(String contentMD5)
Content-MD5 header value for the blob
content. Use this value to specify an MD5 hash of the blob content. This
hash is used to verify the integrity of the blob during transport. When
this header is specified, the storage service checks the hash that has
arrived with the one that was sent. If the two hashes do not match, the
operation will fail with error code 400 (Bad Request). This value will be
returned to clients in the headers of the response when the blob data or
blob properties are requested.
Note that this value only affects calls made on methods where this
CreateBlobOptions instance is passed as a parameter.
contentMD5 - A String containing the Content-MD5
header value to set.CreateBlobOptions instance.public String getCacheControl()
Cache-Control header value set in this
CreateBlobOptions instance.String containing the Cache-Control header
value set, if any.public CreateBlobOptions setCacheControl(String cacheControl)
Cache-Control header value for the blob
content. The Blob service stores this value but does not use or modify
it. This value will be returned to clients in the headers of the response
when the blob data or blob properties are requested.
Note that this value only affects calls made on methods where this
CreateBlobOptions instance is passed as a parameter.
cacheControl - A String containing the Cache-Control
header value to set.CreateBlobOptions instance.public String getBlobContentType()
x-ms-blob-content-type header value set in this
CreateBlobOptions instance.String containing the
x-ms-blob-content-type header value set, if any.public CreateBlobOptions setBlobContentType(String blobContentType)
x-ms-blob-content-type header value for
the blob content. This value will be returned to clients in the headers
of the response when the blob data or blob properties are requested. If
no content type is specified, the default content type is
application/octet-stream.
Note that this value only affects calls made on methods where this
CreateBlobOptions instance is passed as a parameter.
blobContentType - A String containing the
x-ms-blob-content-type header value to set.CreateBlobOptions instance.public String getBlobContentEncoding()
x-ms-blob-content-encoding header value set in this
CreateBlobOptions instance.String containing the
x-ms-blob-content-encoding header value set, if any.public CreateBlobOptions setBlobContentEncoding(String blobContentEncoding)
x-ms-blob-content-encoding header value
for the blob content. Use this value to specify the content encodings
applied to the blob. This value will be returned to clients in the
headers of the response when the blob data or blob properties are
requested.
Note that this value only affects calls made on methods where this
CreateBlobOptions instance is passed as a parameter.
blobContentEncoding - A String containing the
x-ms-blob-content-encoding header value to set.CreateBlobOptions instance.public String getBlobContentLanguage()
x-ms-blob-content-language header value set in this
CreateBlobOptions instance.String containing the
x-ms-blob-content-language header value set, if any.public CreateBlobOptions setBlobContentLanguage(String blobContentLanguage)
x-ms-blob-content-language header value
for the blob content. Use this value to specify the content language of
the blob. This value will be returned to clients in the headers of the
response when the blob data or blob properties are requested.
Note that this value only affects calls made on methods where this
CreateBlobOptions instance is passed as a parameter.
blobContentLanguage - A String containing the
x-ms-blob-content-language header value to set.CreateBlobOptions instance.public String getBlobContentMD5()
x-ms-blob-content-md5 header value set in this
CreateBlobOptions instance.String containing the
x-ms-blob-content-md5 header value set, if any.public CreateBlobOptions setBlobContentMD5(String blobContentMD5)
x-ms-blob-content-md5 header
value of the response when the blob data or blob properties are
requested. This hash is used to verify the integrity of the blob during
transport. When this header is specified, the storage service checks the
hash of the content that has arrived with the one that was sent. If the
two hashes do not match, the operation will fail with error code 400 (Bad
Request), which will cause a ServiceException to be thrown.
Note that this value only affects calls made on methods where this
CreateBlobOptions instance is passed as a parameter.
blobContentMD5 - A String containing the
x-ms-blob-content-md5 header value to set.CreateBlobOptions instance.public String getBlobCacheControl()
x-ms-blob-cache-control header value set in this
CreateBlobOptions instance.String containing the
x-ms-blob-cache-control header value set, if any.public CreateBlobOptions setBlobCacheControl(String blobCacheControl)
x-ms-blob-cache-control header value for
the blob content. The Blob service stores this value but does not use or
modify it. This value will be returned to clients in the headers of the
response when the blob data or blob properties are requested.
Note that this value only affects calls made on methods where this
CreateBlobOptions instance is passed as a parameter.
blobCacheControl - A String containing the
x-ms-blob-cache-control header value to set.CreateBlobOptions instance.public HashMap<String,String> getMetadata()
CreateBlobOptions
instance.public CreateBlobOptions setMetadata(HashMap<String,String> metadata)
String pairs for client
use and is opaque to the server. Metadata names must adhere to the naming
rules for C#
identifiers.
The metadata value only affects calls made on methods where this
CreateBlobOptions instance is passed as a parameter.
metadata - A HashMap of name-value pairs of String
containing the blob metadata to set.CreateBlobOptions instance.public CreateBlobOptions addMetadata(String key, String value)
CreateBlobOptions instance.key - A String containing the name portion of the name-value
pair to add to the metadata collection.value - A String containing the value portion of the
name-value pair to add to the metadata collection.CreateBlobOptions instance.public String getLeaseId()
CreateBlobOptions
instance.String containing the lease ID set, if any.public CreateBlobOptions setLeaseId(String leaseId)
leaseId - A String containing the lease ID to set.CreateBlobOptions instance.public Long getSequenceNumber()
CreateBlobOptions instance.public CreateBlobOptions setSequenceNumber(Long sequenceNumber)
CreateBlobOptions instance. This value is not used for block
blobs. The sequence number is a user-controlled value that you can use to
track requests. The value of the sequence number must be between 0 and
2^63 - 1. The default value is 0.
Note that this value only affects calls made on methods where this
CreateBlobOptions instance is passed as a parameter.
sequenceNumber - The page blob sequence number value to set.CreateBlobOptions instance.public com.microsoft.windowsazure.core.utils.AccessConditionHeader getAccessCondition()
CreateBlobOptions
instance.AccessCondition containing the access conditions set,
if any.public CreateBlobOptions setAccessCondition(com.microsoft.windowsazure.core.utils.AccessConditionHeader accessCondition)
accessCondition - An AccessCondition containing the access conditions to
set.CreateBlobOptions instance./**
* Copyright Microsoft Corporation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/