FileRequestOptions Class
- java.
lang. Object - RequestOptions
- com.
microsoft. azure. storage. file. FileRequestOptions
- com.
public class FileRequestOptions extends RequestOptions
Represents a set of options that may be specified on a request.
Constructor Summary
Constructor | Description |
---|---|
FileRequestOptions() |
Creates an instance of the class. |
FileRequestOptions(final FileRequestOptions other) |
Creates an instance of the class by copying values from another instance. |
Method Summary
Modifier and Type | Method and Description |
---|---|
void |
applyDefaults(final FileRequestOptions modifiedOptions)
Applies defaults to the options passed in. |
Integer |
getConcurrentRequestCount()
Gets the concurrent number of simultaneous requests per operation. For more information about concurrent request count defaults, see setConcurrentRequestCount(final Integer concurrentRequestCount). |
Boolean |
getDisableContentMD5Validation()
Gets whether download and FileInputStream methods should ignore the file's ContentMD5 header. For more information about disabling content MD5 validation defaults, see setDisableContentMD5Validation(final Boolean disableContentMD5Validation) |
Boolean |
getStoreFileContentMD5()
Gets whether the file's ContentMD5 header should be set on uploads. For more information about storing file content MD5 defaults, see setStoreFileContentMD5(final Boolean storeFileContentMD5) . |
Boolean |
getUseTransactionalContentMD5()
Gets whether a range PUT or GET operation will use the Content-MD5 header to enforce transactional security. All partial file uploads or downloads will be restricted to 4 MB. For more information about transactional content MD5 defaults, see setUseTransactionalContentMD5(final Boolean useTransactionalContentMD5). |
final File |
populateAndApplyDefaults(final FileRequestOptions options, final CloudFileClient client)
Uses the concurrent request count from the specified client if , sets a default value for everything else, and sets defaults as defined in the parent class. |
final File |
populateAndApplyDefaults(final FileRequestOptions options, final CloudFileClient client, final boolean setStartTime)
Uses the concurrent request count from the specified client if , sets a default value for everything else, and sets defaults as defined in the parent class. |
void |
setConcurrentRequestCount(final Integer concurrentRequestCount)
Sets the concurrent number of simultaneous requests per operation. The default concurrent request count is set in the client and is by default 1, indicating no concurrency. You can change the concurrent request count on this request by setting this property. You can also change the value on the getDefaultRequestOptions() object so that all subsequent requests made via the service client will use that concurrent request count. |
void |
setDisableContentMD5Validation(final Boolean disableContentMD5Validation)
Sets whether download and FileInputStream methods should ignore the file's ContentMD5 header. The default disableContentMD5Validation value is set in the client and is by default . You can change the disableContentMD5Validation value on this request by setting this property. You can also change the value on the getDefaultRequestOptions() object so that all subsequent requests made via the service client will use that disableContentMD5Validation value. |
final void |
setLocationMode(final LocationMode locationMode)
Sets the LocationMode for this request. The default LocationMode is set in the client and is by default PRIMARY_ONLY. You can change the LocationMode on this request by setting this property. You can also change the value on the getDefaultRequestOptions() object so that all subsequent requests made via the service client will use that LocationMode. |
void |
setRequireEncryption(Boolean requireEncryption)
Encryption is not supported for files. |
void |
setStoreFileContentMD5(final Boolean storeFileContentMD5)
Sets whether the file's ContentMD5 header should be set on uploads. The default storeFileContentMD5 value is set in the client and is by default . You can change the storeFileContentMD5 value on this request by setting this property. You can also change the value on the getDefaultRequestOptions() object so that all subsequent requests made via the service client will use that storeFileContentMD5 value. |
void |
setUseTransactionalContentMD5(final Boolean useTransactionalContentMD5)
Sets whether a range PUT or GET operation will use the Content-MD5 header to enforce transactional security. The default useTransactionalContentMD5 value is set in the client and is by default . You can change the useTransactionalContentMD5 value on this request by setting this property. You can also change the value on the getDefaultRequestOptions() object so that all subsequent requests made via the service client will use that useTransactionalContentMD5 value. |
Inherited Members
Constructor Details
FileRequestOptions
public FileRequestOptions()
Creates an instance of the class.
FileRequestOptions
public FileRequestOptions(final FileRequestOptions other)
Creates an instance of the class by copying values from another instance.
Parameters:
Method Details
applyDefaults
protected static void applyDefaults(final FileRequestOptions modifiedOptions)
Applies defaults to the options passed in.
Parameters:
getConcurrentRequestCount
public Integer getConcurrentRequestCount()
Gets the concurrent number of simultaneous requests per operation. For more information about concurrent request count defaults, see setConcurrentRequestCount(final Integer concurrentRequestCount).
Returns:
getDisableContentMD5Validation
public Boolean getDisableContentMD5Validation()
Gets whether download and FileInputStream methods should ignore the file's ContentMD5 header. For more information about disabling content MD5 validation defaults, see setDisableContentMD5Validation(final Boolean disableContentMD5Validation)
Returns:
getStoreFileContentMD5
public Boolean getStoreFileContentMD5()
Gets whether the file's ContentMD5 header should be set on uploads. For more information about storing file content MD5 defaults, see setStoreFileContentMD5(final Boolean storeFileContentMD5) .
Returns:
getUseTransactionalContentMD5
public Boolean getUseTransactionalContentMD5()
Gets whether a range PUT or GET operation will use the Content-MD5 header to enforce transactional security. All partial file uploads or downloads will be restricted to 4 MB. For more information about transactional content MD5 defaults, see setUseTransactionalContentMD5(final Boolean useTransactionalContentMD5).
Returns:
populateAndApplyDefaults
protected static final FileRequestOptions populateAndApplyDefaults(final FileRequestOptions options, final CloudFileClient client)
Uses the concurrent request count from the specified client if , sets a default value for everything else, and sets defaults as defined in the parent class.
Parameters:
null
. Additionally, the default value of concurrentRequestCount is 1
.
populateAndApplyDefaults
protected static final FileRequestOptions populateAndApplyDefaults(final FileRequestOptions options, final CloudFileClient client, final boolean setStartTime)
Uses the concurrent request count from the specified client if , sets a default value for everything else, and sets defaults as defined in the parent class.
Parameters:
null
. Additionally, the default value of concurrentRequestCount is 1
.
setConcurrentRequestCount
public void setConcurrentRequestCount(final Integer concurrentRequestCount)
Sets the concurrent number of simultaneous requests per operation.
The default concurrent request count is set in the client and is by default 1, indicating no concurrency. You can change the concurrent request count on this request by setting this property. You can also change the value on the getDefaultRequestOptions() object so that all subsequent requests made via the service client will use that concurrent request count.
Parameters:
setDisableContentMD5Validation
public void setDisableContentMD5Validation(final Boolean disableContentMD5Validation)
Sets whether download and FileInputStream methods should ignore the file's ContentMD5 header.
The default disableContentMD5Validation value is set in the client and is by default . You can change the disableContentMD5Validation value on this request by setting this property. You can also change the value on the getDefaultRequestOptions() object so that all subsequent requests made via the service client will use that disableContentMD5Validation value.
Parameters:
setLocationMode
public final void setLocationMode(final LocationMode locationMode)
Sets the LocationMode for this request.
The default LocationMode is set in the client and is by default PRIMARY_ONLY. You can change the LocationMode on this request by setting this property. You can also change the value on the getDefaultRequestOptions() object so that all subsequent requests made via the service client will use that LocationMode.
Parameters:
setRequireEncryption
public void setRequireEncryption(Boolean requireEncryption)
Encryption is not supported for files.
Parameters:
setStoreFileContentMD5
public void setStoreFileContentMD5(final Boolean storeFileContentMD5)
Sets whether the file's ContentMD5 header should be set on uploads.
The default storeFileContentMD5 value is set in the client and is by default . You can change the storeFileContentMD5 value on this request by setting this property. You can also change the value on the getDefaultRequestOptions() object so that all subsequent requests made via the service client will use that storeFileContentMD5 value.
Parameters:
setUseTransactionalContentMD5
public void setUseTransactionalContentMD5(final Boolean useTransactionalContentMD5)
Sets whether a range PUT or GET operation will use the Content-MD5 header to enforce transactional security.
The default useTransactionalContentMD5 value is set in the client and is by default . You can change the useTransactionalContentMD5 value on this request by setting this property. You can also change the value on the getDefaultRequestOptions() object so that all subsequent requests made via the service client will use that useTransactionalContentMD5 value.
Parameters: