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.
/** * 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. */
package com.microsoft.azure.storage; import com.microsoft.azure.storage.blob.BlobInputStream; import com.microsoft.azure.storage.blob.BlobOutputStream; import com.microsoft.azure.storage.file.FileInputStream; import com.microsoft.azure.storage.file.FileOutputStream;
RESERVED FOR INTERNAL USE. Contains storage constants.
/** * RESERVED FOR INTERNAL USE. Contains storage constants. */
public final class Constants {
Defines constants for ServiceProperties requests.
/** * Defines constants for ServiceProperties requests. */
public static class AnalyticsConstants {
The XML element for the CORS Rule AllowedHeaders
/** * The XML element for the CORS Rule AllowedHeaders */
public static final String ALLOWED_HEADERS_ELEMENT = "AllowedHeaders";
The XML element for the CORS Rule AllowedMethods
/** * The XML element for the CORS Rule AllowedMethods */
public static final String ALLOWED_METHODS_ELEMENT = "AllowedMethods";
The XML element for the CORS Rule AllowedOrigins
/** * The XML element for the CORS Rule AllowedOrigins */
public static final String ALLOWED_ORIGINS_ELEMENT = "AllowedOrigins";
The XML element for the CORS
/** * The XML element for the CORS */
public static final String CORS_ELEMENT = "Cors";
The XML element for the CORS Rules
/** * The XML element for the CORS Rules */
public static final String CORS_RULE_ELEMENT = "CorsRule";
The XML element for the RetentionPolicy Days.
/** * The XML element for the RetentionPolicy Days. */
public static final String DAYS_ELEMENT = "Days";
The XML element for the Default Service Version.
/** * The XML element for the Default Service Version. */
public static final String DEFAULT_SERVICE_VERSION = "DefaultServiceVersion";
The XML element for the Logging Delete type.
/** * The XML element for the Logging Delete type. */
public static final String DELETE_ELEMENT = "Delete";
The XML element for the RetentionPolicy Enabled.
/** * The XML element for the RetentionPolicy Enabled. */
public static final String ENABLED_ELEMENT = "Enabled";
The XML element for the CORS Rule ExposedHeaders
/** * The XML element for the CORS Rule ExposedHeaders */
public static final String EXPOSED_HEADERS_ELEMENT = "ExposedHeaders";
The XML element for the Hour Metrics
/** * The XML element for the Hour Metrics */
public static final String HOUR_METRICS_ELEMENT = "HourMetrics";
The XML element for the Metrics IncludeAPIs.
/** * The XML element for the Metrics IncludeAPIs. */
public static final String INCLUDE_APIS_ELEMENT = "IncludeAPIs";
Constant for the logs container.
/** * Constant for the logs container. */
public static final String LOGS_CONTAINER = "$logs";
The XML element for the Logging
/** * The XML element for the Logging */
public static final String LOGGING_ELEMENT = "Logging";
The XML element for the CORS Rule MaxAgeInSeconds
/** * The XML element for the CORS Rule MaxAgeInSeconds */
public static final String MAX_AGE_IN_SECONDS_ELEMENT = "MaxAgeInSeconds";
Constant for the blob capacity metrics table.
/** * Constant for the blob capacity metrics table. */
public static final String METRICS_CAPACITY_BLOB = "$MetricsCapacityBlob";
Constant for the blob service primary location hourly metrics table.
/** * Constant for the blob service primary location hourly metrics table. */
public static final String METRICS_HOUR_PRIMARY_TRANSACTIONS_BLOB = "$MetricsHourPrimaryTransactionsBlob";
Constant for the file service primary location hourly metrics table.
/** * Constant for the file service primary location hourly metrics table. */
public static final String METRICS_HOUR_PRIMARY_TRANSACTIONS_FILE = "$MetricsHourPrimaryTransactionsFile";
Constant for the table service primary location hourly metrics table.
/** * Constant for the table service primary location hourly metrics table. */
public static final String METRICS_HOUR_PRIMARY_TRANSACTIONS_TABLE = "$MetricsHourPrimaryTransactionsTable";
Constant for the queue service primary location hourly metrics table.
/** * Constant for the queue service primary location hourly metrics table. */
public static final String METRICS_HOUR_PRIMARY_TRANSACTIONS_QUEUE = "$MetricsHourPrimaryTransactionsQueue";
Constant for the blob service primary location minute metrics table.
/** * Constant for the blob service primary location minute metrics table. */
public static final String METRICS_MINUTE_PRIMARY_TRANSACTIONS_BLOB = "$MetricsMinutePrimaryTransactionsBlob";
Constant for the file service primary location minute metrics table.
/** * Constant for the file service primary location minute metrics table. */
public static final String METRICS_MINUTE_PRIMARY_TRANSACTIONS_FILE = "$MetricsMinutePrimaryTransactionsFile";
Constant for the table service primary location minute metrics table.
/** * Constant for the table service primary location minute metrics table. */
public static final String METRICS_MINUTE_PRIMARY_TRANSACTIONS_TABLE = "$MetricsMinutePrimaryTransactionsTable";
Constant for the queue service primary location minute metrics table.
/** * Constant for the queue service primary location minute metrics table. */
public static final String METRICS_MINUTE_PRIMARY_TRANSACTIONS_QUEUE = "$MetricsMinutePrimaryTransactionsQueue";
Constant for the blob service secondary location hourly metrics table.
/** * Constant for the blob service secondary location hourly metrics table. */
public static final String METRICS_HOUR_SECONDARY_TRANSACTIONS_BLOB = "$MetricsHourSecondaryTransactionsBlob";
Constant for the file service secondary location hourly metrics table.
/** * Constant for the file service secondary location hourly metrics table. */
public static final String METRICS_HOUR_SECONDARY_TRANSACTIONS_FILE = "$MetricsHourSecondaryTransactionsFile";
Constant for the table service secondary location hourly metrics table.
/** * Constant for the table service secondary location hourly metrics table. */
public static final String METRICS_HOUR_SECONDARY_TRANSACTIONS_TABLE = "$MetricsHourSecondaryTransactionsTable";
Constant for the queue service secondary location hourly metrics table.
/** * Constant for the queue service secondary location hourly metrics table. */
public static final String METRICS_HOUR_SECONDARY_TRANSACTIONS_QUEUE = "$MetricsHourSecondaryTransactionsQueue";
Constant for the blob service secondary location minute metrics table.
/** * Constant for the blob service secondary location minute metrics table. */
public static final String METRICS_MINUTE_SECONDARY_TRANSACTIONS_BLOB = "$MetricsMinuteSecondaryTransactionsBlob";
Constant for the file service secondary location minute metrics table.
/** * Constant for the file service secondary location minute metrics table. */
public static final String METRICS_MINUTE_SECONDARY_TRANSACTIONS_FILE = "$MetricsMinuteSecondaryTransactionsFile";
Constant for the table service secondary location minute metrics table.
/** * Constant for the table service secondary location minute metrics table. */
public static final String METRICS_MINUTE_SECONDARY_TRANSACTIONS_TABLE = "$MetricsMinuteSecondaryTransactionsTable";
Constant for the queue service secondary location minute metrics table.
/** * Constant for the queue service secondary location minute metrics table. */
public static final String METRICS_MINUTE_SECONDARY_TRANSACTIONS_QUEUE = "$MetricsMinuteSecondaryTransactionsQueue";
The XML element for the Minute Metrics
/** * The XML element for the Minute Metrics */
public static final String MINUTE_METRICS_ELEMENT = "MinuteMetrics";
The XML element for the Logging Read type.
/** * The XML element for the Logging Read type. */
public static final String READ_ELEMENT = "Read";
The XML element for the RetentionPolicy.
/** * The XML element for the RetentionPolicy. */
public static final String RETENTION_POLICY_ELEMENT = "RetentionPolicy";
The XML element for Static Website.
/** * The XML element for Static Website. */
public static final String STATIC_WEBSITE_ELEMENT = "StaticWebsite";
The XML element for IndexDocument
/** * The XML element for IndexDocument */
public static final String STATIC_WEBSITE_INDEX_DOCUMENT_ELEMENT = "IndexDocument";
THe XML element for ErroDocument404PathName.
/** * THe XML element for ErroDocument404PathName. */
public static final String STATIC_WEBSITE_ERROR_DOCUMENT_404_PATH_ELEMENT = "ErrorDocument404Path";
The XML element for the StorageServiceProperties
/** * The XML element for the StorageServiceProperties */
public static final String STORAGE_SERVICE_PROPERTIES_ELEMENT = "StorageServiceProperties";
The XML element for the StorageServiceStats
/** * The XML element for the StorageServiceStats */
public static final String STORAGE_SERVICE_STATS = "StorageServiceStats";
The XML element for the Version
/** * The XML element for the Version */
public static final String VERSION_ELEMENT = "Version";
The XML element for the Logging Write type.
/** * The XML element for the Logging Write type. */
public static final String WRITE_ELEMENT = "Write";
The XML element for the delete retention policy.
/** * The XML element for the delete retention policy. */
public static final String DELETE_RETENTION_POLICY_ELEMENT = "DeleteRetentionPolicy"; }
Defines constants for client encryption.
/** * Defines constants for client encryption. */
public static class EncryptionConstants {
Metadata header to store encryption materials.
/** * Metadata header to store encryption materials. */
public static final String BLOB_ENCRYPTION_DATA = "encryptiondata";
Constant for the encryption protocol.
/** * Constant for the encryption protocol. */
public static final String ENCRYPTION_PROTOCOL_V1 = "1.0";
Encryption metadata key for key wrapping IV.
/** * Encryption metadata key for key wrapping IV. */
public static final String KEY_WRAPPING_IV = "KeyWrappingIV";
Property name to store the encryption metadata.
/** * Property name to store the encryption metadata. */
public static final String TABLE_ENCRYPTION_KEY_DETAILS = "_ClientEncryptionMetadata1";
Additional property name to store the encryption metadata.
/** * Additional property name to store the encryption metadata. */
public static final String TABLE_ENCRYPTION_PROPERTY_DETAILS = "_ClientEncryptionMetadata2";
Constant for the key for the encryption mode.
/** * Constant for the key for the encryption mode. */
public static final String ENCRYPTION_MODE = "EncryptionMode";
FullBlob string constant for the encryption mode.
/** * FullBlob string constant for the encryption mode. */
public static final String FULL_BLOB = "FullBlob";
Constant for the key for the wrapped CEK.
/** * Constant for the key for the wrapped CEK. */
public static final String WRAPPED_CONTENT_KEY = "WrappedContentKey";
Constant for the key for the encryption agent.
/** * Constant for the key for the encryption agent. */
public static final String ENCRYPTION_AGENT = "EncryptionAgent";
Constant for the key for the IV.
/** * Constant for the key for the IV. */
public static final String CONTENT_ENCRYPTION_IV = "ContentEncryptionIV";
Constant for the key wrapping metadata.
/** * Constant for the key wrapping metadata. */
public static final String KEY_WRAPPING_METADATA = "KeyWrappingMetadata";
Constant for the key for the encryption library in the key wrapping metadata.
/** * Constant for the key for the encryption library in the key wrapping metadata. */
public static final String ENCRYPTION_LIBRARY = "EncryptionLibrary"; }
Defines constants for use with HTTP headers.
/** * Defines constants for use with HTTP headers. */
public static class HeaderConstants {
The Accept header.
/** * The Accept header. */
public static final String ACCEPT = "Accept";
The Accept header.
/** * The Accept header. */
public static final String ACCEPT_CHARSET = "Accept-Charset";
The header that represents the kind of storage account.
/** * The header that represents the kind of storage account. */
public static final String ACCOUNT_KIND = PREFIX_FOR_STORAGE_HEADER + "account-kind";
The Authorization header.
/** * The Authorization header. */
public static final String AUTHORIZATION = "Authorization";
The keyword used for bearer token authorization.
/** * The keyword used for bearer token authorization. */
public static final String BEARER = "Bearer";
The format string for specifying ranges with only begin offset.
/** * The format string for specifying ranges with only begin offset. */
public static final String BEGIN_RANGE_HEADER_FORMAT = "bytes=%d-";
The format string for specifying the blob append offset.
/** * The format string for specifying the blob append offset. */
public static final String BLOB_APPEND_OFFSET = PREFIX_FOR_STORAGE_HEADER + "blob-append-offset";
The header that specifies committed block count.
/** * The header that specifies committed block count. */
public static final String BLOB_COMMITTED_BLOCK_COUNT = PREFIX_FOR_STORAGE_HEADER + "blob-committed-block-count";
The header that specifies blob sequence number.
/** * The header that specifies blob sequence number. */
public static final String BLOB_SEQUENCE_NUMBER = PREFIX_FOR_STORAGE_HEADER + "blob-sequence-number";
The CacheControl header.
/** * The CacheControl header. */
public static final String CACHE_CONTROL = "Cache-Control";
The header that specifies blob caching control.
/** * The header that specifies blob caching control. */
public static final String CACHE_CONTROL_HEADER = PREFIX_FOR_STORAGE_HEADER + "blob-cache-control";
The key header for client-provided key encryption.
/** * The key header for client-provided key encryption. */
public static final String CLIENT_PROVIDED_ENCRYPTION_SUCCESS = PREFIX_FOR_STORAGE_HEADER + "request-server-encrypted";
The key header for client-provided key encryption.
/** * The key header for client-provided key encryption. */
public static final String CLIENT_PROVIDED_ENCRYPTION_KEY = PREFIX_FOR_STORAGE_HEADER + "encryption-key";
The key hash header for client-provided key encryption
/** * The key hash header for client-provided key encryption */
public static final String CLIENT_PROVIDED_ENCRYPTION_KEY_HASH = PREFIX_FOR_STORAGE_HEADER + "encryption-key-sha256";
The encryption algorithm header for client-provided key encryption.
/** * The encryption algorithm header for client-provided key encryption. */
public static final String CLIENT_PROVIDED_ENCRYPTION_ALGORITHM = PREFIX_FOR_STORAGE_HEADER + "encryption-algorithm";
The key header for client-provided key encryption.
/** * The key header for client-provided key encryption. */
public static final String CLIENT_PROVIDED_ENCRYPTION_KEY_SOURCE = PREFIX_FOR_STORAGE_HEADER + "source-encryption-key";
The key hash header for client-provided key encryption
/** * The key hash header for client-provided key encryption */
public static final String CLIENT_PROVIDED_ENCRYPTION_KEY_HASH_SOURCE = PREFIX_FOR_STORAGE_HEADER + "source-encryption-key-sha256";
The encryption algorithm header for client-provided key encryption.
/** * The encryption algorithm header for client-provided key encryption. */
public static final String CLIENT_PROVIDED_ENCRYPTION_ALGORITHM_SOURCE = PREFIX_FOR_STORAGE_HEADER + "source-encryption-algorithm";
The header that indicates the client request ID.
/** * The header that indicates the client request ID. */
public static final String CLIENT_REQUEST_ID_HEADER = PREFIX_FOR_STORAGE_HEADER + "client-request-id";
The ContentDisposition header.
/** * The ContentDisposition header. */
public static final String CONTENT_DISPOSITION = "Content-Disposition";
The ContentEncoding header.
/** * The ContentEncoding header. */
public static final String CONTENT_ENCODING = "Content-Encoding";
The ContentID header.
/** * The ContentID header. */
public static final String CONTENT_ID = "Content-ID";
The ContentLangauge header.
/** * The ContentLangauge header. */
public static final String CONTENT_LANGUAGE = "Content-Language";
The ContentLength header.
/** * The ContentLength header. */
public static final String CONTENT_LENGTH = "Content-Length";
The ContentMD5 header.
/** * The ContentMD5 header. */
public static final String CONTENT_MD5 = "Content-MD5";
The ContentRange header.
/** * The ContentRange header. */
public static final String CONTENT_RANGE = "Content-Range";
The ContentTransferEncoding header.
/** * The ContentTransferEncoding header. */
public static final String CONTENT_TRANSFER_ENCODING = "Content-Transfer-Encoding";
The ContentType header.
/** * The ContentType header. */
public static final String CONTENT_TYPE = "Content-Type";
The value of the copy action header that signifies an abort operation.
/** * The value of the copy action header that signifies an abort operation. */
public static final String COPY_ACTION_ABORT = "abort";
Header that specifies the copy action.
/** * Header that specifies the copy action. */
public static final String COPY_ACTION_HEADER = PREFIX_FOR_STORAGE_HEADER + "copy-action";
The header that specifies copy completion time.
/** * The header that specifies copy completion time. */
public static final String COPY_COMPLETION_TIME = PREFIX_FOR_STORAGE_HEADER + "copy-completion-time";
The header that specifies copy id.
/** * The header that specifies copy id. */
public static final String COPY_ID = PREFIX_FOR_STORAGE_HEADER + "copy-id";
The header that specifies copy progress.
/** * The header that specifies copy progress. */
public static final String COPY_PROGRESS = PREFIX_FOR_STORAGE_HEADER + "copy-progress";
The header that specifies copy source.
/** * The header that specifies copy source. */
public static final String COPY_SOURCE = PREFIX_FOR_STORAGE_HEADER + "copy-source";
The header for copy source.
/** * The header for copy source. */
public static final String COPY_SOURCE_HEADER = PREFIX_FOR_STORAGE_HEADER + "copy-source";
The header that specifies copy status.
/** * The header that specifies copy status. */
public static final String COPY_STATUS = PREFIX_FOR_STORAGE_HEADER + "copy-status";
The header that specifies copy status description.
/** * The header that specifies copy status description. */
public static final String COPY_STATUS_DESCRIPTION = PREFIX_FOR_STORAGE_HEADER + "copy-status-description";
The header that specifies copy type.
/** * The header that specifies copy type. */
public static final String INCREMENTAL_COPY = PREFIX_FOR_STORAGE_HEADER + "incremental-copy";
The header that specifies the snapshot ID of the last successful incremental snapshot.
/** * The header that specifies the snapshot ID of the last successful incremental snapshot. */
public static final String COPY_DESTINATION_SNAPSHOT_ID = PREFIX_FOR_STORAGE_HEADER + "copy-destination-snapshot";
The header that specifies the date.
/** * The header that specifies the date. */
public static final String DATE = PREFIX_FOR_STORAGE_HEADER + "date";
The header to delete snapshots.
/** * The header to delete snapshots. */
public static final String DELETE_SNAPSHOT_HEADER = PREFIX_FOR_STORAGE_HEADER + "delete-snapshots";
The ETag header.
/** * The ETag header. */
public static final String ETAG = "ETag";
The ErrorCode header.
/** * The ErrorCode header. */
public static final String ERROR_CODE = "x-ms-error-code";
An unused HTTP code used internally to indicate a non-http related failure when constructing StorageException objects
/** * An unused HTTP code used internally to indicate a non-http related failure when constructing * {@link StorageException} objects */
public static final int HTTP_UNUSED_306 = 306;
The blob append position equal header.
/** * The blob append position equal header. */
public static final String IF_APPEND_POSITION_EQUAL_HEADER = PREFIX_FOR_STORAGE_HEADER + "blob-condition-appendpos";
The IfMatch header.
/** * The IfMatch header. */
public static final String IF_MATCH = "If-Match";
The blob maxsize condition header.
/** * The blob maxsize condition header. */
public static final String IF_MAX_SIZE_LESS_THAN_OR_EQUAL = PREFIX_FOR_STORAGE_HEADER + "blob-condition-maxsize";
The IfModifiedSince header.
/** * The IfModifiedSince header. */
public static final String IF_MODIFIED_SINCE = "If-Modified-Since";
The IfNoneMatch header.
/** * The IfNoneMatch header. */
public static final String IF_NONE_MATCH = "If-None-Match";
The IfUnmodifiedSince header.
/** * The IfUnmodifiedSince header. */
public static final String IF_UNMODIFIED_SINCE = "If-Unmodified-Since";
The blob sequence number less than or equal condition header.
/** * The blob sequence number less than or equal condition header. */
public static final String IF_SEQUENCE_NUMBER_LESS_THAN_OR_EQUAL = PREFIX_FOR_STORAGE_HEADER + "if-sequence-number-le";
The blob sequence number less than condition header.
/** * The blob sequence number less than condition header. */
public static final String IF_SEQUENCE_NUMBER_LESS_THAN = PREFIX_FOR_STORAGE_HEADER + "if-sequence-number-lt";
The blob sequence number equal condition header.
/** * The blob sequence number equal condition header. */
public static final String IF_SEQUENCE_NUMBER_EQUAL = PREFIX_FOR_STORAGE_HEADER + "if-sequence-number-eq";
Specifies snapshots are to be included.
/** * Specifies snapshots are to be included. */
public static final String INCLUDE_SNAPSHOTS_VALUE = "include";
The header that specifies the lease action to perform
/** * The header that specifies the lease action to perform */
public static final String LEASE_ACTION_HEADER = PREFIX_FOR_STORAGE_HEADER + "lease-action";
The header that specifies the break period of a lease
/** * The header that specifies the break period of a lease */
public static final String LEASE_BREAK_PERIOD_HEADER = PREFIX_FOR_STORAGE_HEADER + "lease-break-period";
The header that specifies lease duration.
/** * The header that specifies lease duration. */
public static final String LEASE_DURATION = PREFIX_FOR_STORAGE_HEADER + "lease-duration";
The header that specifies lease ID.
/** * The header that specifies lease ID. */
public static final String LEASE_ID_HEADER = PREFIX_FOR_STORAGE_HEADER + "lease-id";
The header that specifies lease state.
/** * The header that specifies lease state. */
public static final String LEASE_STATE = PREFIX_FOR_STORAGE_HEADER + "lease-state";
The header that specifies lease status.
/** * The header that specifies lease status. */
public static final String LEASE_STATUS = PREFIX_FOR_STORAGE_HEADER + "lease-status";
The header that specifies the remaining lease time
/** * The header that specifies the remaining lease time */
public static final String LEASE_TIME_HEADER = PREFIX_FOR_STORAGE_HEADER + "lease-time";
The header that specifies the pop receipt.
/** * The header that specifies the pop receipt. */
public static final String POP_RECEIPT_HEADER = PREFIX_FOR_STORAGE_HEADER + "popreceipt";
The header that specifies recursive listing.
/** * The header that specifies recursive listing. */
public static final String RECURSIVE = PREFIX_FOR_STORAGE_HEADER + "recursive";
The header prefix for metadata.
/** * The header prefix for metadata. */
public static final String PREFIX_FOR_STORAGE_METADATA = "x-ms-meta-";
The header prefix for properties.
/** * The header prefix for properties. */
public static final String PREFIX_FOR_STORAGE_PROPERTIES = "x-ms-prop-";
The header that specifies the proposed lease ID for a leasing operation
/** * The header that specifies the proposed lease ID for a leasing operation */
public static final String PROPOSED_LEASE_ID_HEADER = PREFIX_FOR_STORAGE_HEADER + "proposed-lease-id";
The Range header.
/** * The Range header. */
public static final String RANGE = "Range";
The header that specifies if the request will populate the ContentMD5 header for range gets.
/** * The header that specifies if the request will populate the ContentMD5 header for range gets. */
public static final String RANGE_GET_CONTENT_MD5 = PREFIX_FOR_STORAGE_HEADER + "range-get-content-md5";
The format string for specifying ranges.
/** * The format string for specifying ranges. */
public static final String RANGE_HEADER_FORMAT = "bytes=%d-%d";
The header that indicates the request ID.
/** * The header that indicates the request ID. */
public static final String REQUEST_ID_HEADER = PREFIX_FOR_STORAGE_HEADER + "request-id";
The header for copy sync.
/** * The header for copy sync. */
public static final String REQUIRES_SYNC_HEADER = PREFIX_FOR_STORAGE_HEADER + "requires-sync";
The header field value received that indicates which server was accessed
/** * The header field value received that indicates which server was accessed */
public static final String SERVER = "Server";
The header that specifies whether a resource is fully encrypted server-side
/** * The header that specifies whether a resource is fully encrypted server-side */
public static final String SERVER_ENCRYPTED = PREFIX_FOR_STORAGE_HEADER + "server-encrypted";
The header that acknowledges data used for a write operation is encrypted server-side
/** * The header that acknowledges data used for a write operation is encrypted server-side */
public static final String SERVER_REQUEST_ENCRYPTED = PREFIX_FOR_STORAGE_HEADER + "request-server-encrypted";
The header that specifies the sku name for an account.
/** * The header that specifies the sku name for an account. */
public static final String SKU_NAME = PREFIX_FOR_STORAGE_HEADER + "sku-name";
The header that specifies the snapshot ID.
/** * The header that specifies the snapshot ID. */
public static final String SNAPSHOT_ID_HEADER = PREFIX_FOR_STORAGE_HEADER + "snapshot";
The header that specifies source content MD5.
/** * The header that specifies source content MD5. */
public static final String SOURCE_CONTENT_MD5_HEADER = PREFIX_FOR_STORAGE_HEADER + "source-content-md5";
The header for the If-Match condition.
/** * The header for the If-Match condition. */
public static final String SOURCE_IF_MATCH_HEADER = PREFIX_FOR_STORAGE_HEADER + "source-if-match";
The header for the If-Modified-Since condition.
/** * The header for the If-Modified-Since condition. */
public static final String SOURCE_IF_MODIFIED_SINCE_HEADER = PREFIX_FOR_STORAGE_HEADER + "source-if-modified-since";
The header for the If-None-Match condition.
/** * The header for the If-None-Match condition. */
public static final String SOURCE_IF_NONE_MATCH_HEADER = PREFIX_FOR_STORAGE_HEADER + "source-if-none-match";
The header for the If-Unmodified-Since condition.
/** * The header for the If-Unmodified-Since condition. */
public static final String SOURCE_IF_UNMODIFIED_SINCE_HEADER = PREFIX_FOR_STORAGE_HEADER + "source-if-unmodified-since";
The header for the source lease id.
/** * The header for the source lease id. */
public static final String SOURCE_LEASE_ID_HEADER = PREFIX_FOR_STORAGE_HEADER + "source-lease-id";
The header for data ranges.
/** * The header for data ranges. */
public static final String STORAGE_RANGE_HEADER = PREFIX_FOR_STORAGE_HEADER + "range";
The header for data ranges.
/** * The header for data ranges. */
public static final String STORAGE_SOURCE_RANGE_HEADER = PREFIX_FOR_STORAGE_HEADER + "source-range";
The header for storage version.
/** * The header for storage version. */
public static final String STORAGE_VERSION_HEADER = PREFIX_FOR_STORAGE_HEADER + "version";
The current storage version header value.
/** * The current storage version header value. */
public static final String TARGET_STORAGE_VERSION = "2019-02-02";
The header that specifies the next visible time for a queue message.
/** * The header that specifies the next visible time for a queue message. */
public static final String TIME_NEXT_VISIBLE_HEADER = PREFIX_FOR_STORAGE_HEADER + "time-next-visible";
The UserAgent header.
/** * The UserAgent header. */
public static final String USER_AGENT = "User-Agent";
Specifies the value to use for UserAgent header.
/** * Specifies the value to use for UserAgent header. */
public static final String USER_AGENT_PREFIX = "Azure-Storage";
Specifies the value to use for UserAgent header.
/** * Specifies the value to use for UserAgent header. */
public static final String USER_AGENT_VERSION = "8.6.6";
The default type for content-type and accept
/** * The default type for content-type and accept */
public static final String XML_TYPE = "application/xml";
Specifies the JSON content type
/** * Specifies the JSON content type */
public static final String JSON_TYPE = "application/json"; }
Defines constants for use with query strings.
/** * Defines constants for use with query strings. */
public static class QueryConstants {
The query component for the api version.
/** * The query component for the api version. */
public static final String API_VERSION = "api-version";
Query component for SAS cache control.
/** * Query component for SAS cache control. */
public static final String CACHE_CONTROL = "rscc";
Query component for SAS content type.
/** * Query component for SAS content type. */
public static final String CONTENT_TYPE = "rsct";
Query component for SAS content encoding.
/** * Query component for SAS content encoding. */
public static final String CONTENT_ENCODING = "rsce";
Query component for SAS content language.
/** * Query component for SAS content language. */
public static final String CONTENT_LANGUAGE = "rscl";
Query component for SAS content disposition.
/** * Query component for SAS content disposition. */
public static final String CONTENT_DISPOSITION = "rscd";
Query component for the operation (component) to access.
/** * Query component for the operation (component) to access. */
public static final String COMPONENT = "comp";
Query component for copy.
/** * Query component for copy. */
public static final String COPY = "copy";
Query component for the copy ID.
/** * Query component for the copy ID. */
public static final String COPY_ID = "copyid";
The query component for the SAS end partition key.
/** * The query component for the SAS end partition key. */
public static final String END_PARTITION_KEY = "epk";
The query component for the SAS end row key.
/** * The query component for the SAS end row key. */
public static final String END_ROW_KEY = "erk";
The query component for force close handles.
/** * The query component for force close handles. */
public static final String CLOSE_HANDLES = "forceclosehandles";
Query component value for list.
/** * Query component value for list. */
public static final String LIST = "list";
Query component for list handles.
/** * Query component for list handles. */
public static final String LIST_HANDLES = "listhandles";
Query component value for properties.
/** * Query component value for properties. */
public static final String PROPERTIES = "properties";
Query component for resource type.
/** * Query component for resource type. */
public static final String RESOURCETYPE = "restype";
The query component for the SAS table name.
/** * The query component for the SAS table name. */
public static final String SAS_TABLE_NAME = "tn";
The query component for the SAS signature.
/** * The query component for the SAS signature. */
public static final String SIGNATURE = "sig";
The query component for the signed SAS expiry time.
/** * The query component for the signed SAS expiry time. */
public static final String SIGNED_EXPIRY = "se";
The query component for the signed SAS identifier.
/** * The query component for the signed SAS identifier. */
public static final String SIGNED_IDENTIFIER = "si";
The query component for the signed SAS IP address.
/** * The query component for the signed SAS IP address. */
public static final String SIGNED_IP = "sip";
The query component for the signing SAS key.
/** * The query component for the signing SAS key. */
public static final String SIGNED_KEY = "sk";
The query component for the signed SAS permissions.
/** * The query component for the signed SAS permissions. */
public static final String SIGNED_PERMISSIONS = "sp";
The query component for the signed SAS Internet protocols.
/** * The query component for the signed SAS Internet protocols. */
public static final String SIGNED_PROTOCOLS = "spr";
The query component for the signed SAS resource.
/** * The query component for the signed SAS resource. */
public static final String SIGNED_RESOURCE = "sr";
The query component for the signed SAS resource type.
/** * The query component for the signed SAS resource type. */
public static final String SIGNED_RESOURCE_TYPE = "srt";
The query component for the signed SAS service.
/** * The query component for the signed SAS service. */
public static final String SIGNED_SERVICE = "ss";
The query component for the signed SAS start time.
/** * The query component for the signed SAS start time. */
public static final String SIGNED_START = "st";
The query component for the signed SAS version.
/** * The query component for the signed SAS version. */
public static final String SIGNED_VERSION = "sv";
The query value for blob as the signed service.
/** * The query value for blob as the signed service. */
public static final String BLOB_RESOURCE = "b";
The query value for blob snapshot as the signed service.
/** * The query value for blob snapshot as the signed service. */
public static final String BLOB_SNAPSHOT_SERVICE = "bs";
The query value for container as the signed service.
/** * The query value for container as the signed service. */
public static final String CONTAINER_RESOURCE = "c";
The query value for container as the signed service.
/** * The query value for container as the signed service. */
public static final String FILE_SERVICE = "f";
The query component for signed object id.
/** * The query component for signed object id. */
public static final String SIGNED_KEY_OID = "skoid";
The query component for signed tenant id.
/** * The query component for signed tenant id. */
public static final String SIGNED_KEY_TID = "sktid";
The query component for signed key start.
/** * The query component for signed key start. */
public static final String SIGNED_KEY_START = "skt";
The query component for signed key expiration.
/** * The query component for signed key expiration. */
public static final String SIGNED_KEY_EXPIRY = "ske";
The query component for signed service.
/** * The query component for signed service. */
public static final String SIGNED_KEY_SERVICE = "sks";
The query component for signed version.
/** * The query component for signed version. */
public static final String SIGNED_KEY_VERSION = "skv";
The query component for snapshot time.
/** * The query component for snapshot time. */
public static final String SNAPSHOT = "snapshot";
The query component for snapshot time.
/** * The query component for snapshot time. */
public static final String SHARE_SNAPSHOT = "sharesnapshot";
The query component for un-delete operation.
/** * The query component for un-delete operation. */
public static final String UNDELETE = "undelete";
The query component for the SAS start partition key.
/** * The query component for the SAS start partition key. */
public static final String START_PARTITION_KEY = "spk";
The query component for the SAS start row key.
/** * The query component for the SAS start row key. */
public static final String START_ROW_KEY = "srk";
The query component for stats.
/** * The query component for stats. */
public static final String STATS = "stats";
The query component for delimiter.
/** * The query component for delimiter. */
public static final String DELIMITER = "delimiter";
The query component for include.
/** * The query component for include. */
public static final String INCLUDE = "include";
The query component for marker.
/** * The query component for marker. */
public static final String MARKER = "marker";
The query component for max results.
/** * The query component for max results. */
public static final String MAX_RESULTS = "maxresults";
The query component for metadata.
/** * The query component for metadata. */
public static final String METADATA = "metadata";
The query component for prefix.
/** * The query component for prefix. */
public static final String PREFIX = "prefix";
The query component for acl.
/** * The query component for acl. */
public static final String ACL = "acl"; }
The master Microsoft Azure Storage header prefix.
/** * The master Microsoft Azure Storage header prefix. */
public static final String PREFIX_FOR_STORAGE_HEADER = "x-ms-";
Constant representing a kilobyte (Non-SI version).
/** * Constant representing a kilobyte (Non-SI version). */
public static final int KB = 1024;
Constant representing a megabyte (Non-SI version).
/** * Constant representing a megabyte (Non-SI version). */
public static final int MB = 1024 * KB;
Constant representing a gigabyte (Non-SI version).
/** * Constant representing a gigabyte (Non-SI version). */
public static final int GB = 1024 * MB;
XML element for an access policy.
/** * XML element for an access policy. */
public static final String ACCESS_POLICY = "AccessPolicy";
XML element for access tier.
/** * XML element for access tier. */
public static final String ACCESS_TIER = "AccessTier";
XML element for the access tier change time.
/** * XML element for the access tier change time. */
public static final String ACCESS_TIER_CHANGE_TIME = "AccessTierChangeTime";
XML element for access if the access tier is inferred.
/** * XML element for access if the access tier is inferred. */
public static final String ACCESS_TIER_INFERRED = "AccessTierInferred";
XML element for the archive status.
/** * XML element for the archive status. */
public static final String ARCHIVE_STATUS = "ArchiveStatus";
Maximum number of requests that can be batched together.
/** * Maximum number of requests that can be batched together. */
public static final int BATCH_MAX_REQUESTS = 256;
Buffer width used to copy data to output streams.
/** * Buffer width used to copy data to output streams. */
public static final int BUFFER_COPY_LENGTH = 8 * KB;
XML element for the copy completion time.
/** * XML element for the copy completion time. */
public static final String COPY_COMPLETION_TIME_ELEMENT = "CopyCompletionTime";
XML element for the copy id.
/** * XML element for the copy id. */
public static final String COPY_ID_ELEMENT = "CopyId";
XML element for the copy progress.
/** * XML element for the copy progress. */
public static final String COPY_PROGRESS_ELEMENT = "CopyProgress";
XML element for the copy source .
/** * XML element for the copy source . */
public static final String COPY_SOURCE_ELEMENT = "CopySource";
XML element for the copy status description.
/** * XML element for the copy status description. */
public static final String COPY_STATUS_DESCRIPTION_ELEMENT = "CopyStatusDescription";
XML element for the copy status.
/** * XML element for the copy status. */
public static final String COPY_STATUS_ELEMENT = "CopyStatus";
XML element for the copy type.
/** * XML element for the copy type. */
public static final String INCREMENTAL_COPY_ELEMENT = "IncrementalCopy";
XML element for the snapshot ID for the last successful incremental copy.
/** * XML element for the snapshot ID for the last successful incremental copy. */
public static final String COPY_DESTINATION_SNAPSHOT_ID_ELEMENT = "CopyDestinationSnapshot";
Default read timeout. 5 min * 60 seconds * 1000 ms
/** * Default read timeout. 5 min * 60 seconds * 1000 ms */
public static final int DEFAULT_READ_TIMEOUT = 5 * 60 * 1000;
XML element for delimiters.
/** * XML element for delimiters. */
public static final String DELIMITER_ELEMENT = "Delimiter";
Http GET method.
/** * Http GET method. */
public static final String HTTP_GET = "GET";
Http PUT method.
/** * Http PUT method. */
public static final String HTTP_PUT = "PUT";
Http DELETE method.
/** * Http DELETE method. */
public static final String HTTP_DELETE = "DELETE";
Http HEAD method.
/** * Http HEAD method. */
public static final String HTTP_HEAD = "HEAD";
Http POST method.
/** * Http POST method. */
public static final String HTTP_POST = "POST";
An empty String to use for comparison.
/** * An empty <code>String</code> to use for comparison. */
public static final String EMPTY_STRING = "";
XML element for page range end elements.
/** * XML element for page range end elements. */
public static final String END_ELEMENT = "End";
XML element for error codes.
/** * XML element for error codes. */
public static final String ERROR_CODE = "Code";
XML element for exception details.
/** * XML element for exception details. */
public static final String ERROR_EXCEPTION = "ExceptionDetails";
XML element for exception messages.
/** * XML element for exception messages. */
public static final String ERROR_EXCEPTION_MESSAGE = "ExceptionMessage";
XML element for stack traces.
/** * XML element for stack traces. */
public static final String ERROR_EXCEPTION_STACK_TRACE = "StackTrace";
XML element for error messages.
/** * XML element for error messages. */
public static final String ERROR_MESSAGE = "Message";
XML root element for errors.
/** * XML root element for errors. */
public static final String ERROR_ROOT_ELEMENT = "Error";
XML element for the ETag.
/** * XML element for the ETag. */
public static final String ETAG_ELEMENT = "Etag";
XML element for the end time of an access policy.
/** * XML element for the end time of an access policy. */
public static final String EXPIRY = "Expiry";
The XML element for the signed object ID.
/** * The XML element for the signed object ID. */
public static final String SIGNED_OID_ELEMENT = "SignedOid";
The XML element for the signed tenant ID.
/** * The XML element for the signed tenant ID. */
public static final String SIGNED_TID_ELEMENT = "SignedTid";
The XML element for the signed start time.
/** * The XML element for the signed start time. */
public static final String SIGNED_START_ELEMENT = "SignedStart";
The XML element for the signed expiration time.
/** * The XML element for the signed expiration time. */
public static final String SIGNED_EXPIRY_ELEMENT = "SignedExpiry";
The XML element for the REST API version used to create the key.
/** * The XML element for the REST API version used to create the key. */
public static final String SIGNED_VERSION_ELEMENT = "SignedVersion";
The XML element for the storage service used by this key.
/** * The XML element for the storage service used by this key. */
public static final String SIGNED_SERVICE_ELEMENT = "SignedService";
The XML element for a generic value.
/** * The XML element for a generic value. */
public static final String VALUE_ELEMENT = "Value";
Constant for False.
/** * Constant for False. */
public static final String FALSE = "false";
Constant for bootstrap geo-replication status.
/** * Constant for bootstrap geo-replication status. */
public static final String GEO_BOOTSTRAP_VALUE = "bootstrap";
Constant for live geo-replication status.
/** * Constant for live geo-replication status. */
public static final String GEO_LIVE_VALUE = "live";
Constant for unavailable geo-replication status.
/** * Constant for unavailable geo-replication status. */
public static final String GEO_UNAVAILABLE_VALUE = "unavailable";
Specifies HTTP.
/** * Specifies HTTP. */
public static final String HTTP = "http";
Specifies HTTPS.
/** * Specifies HTTPS. */
public static final String HTTPS = "https";
Specifies both HTTPS and HTTP.
/** * Specifies both HTTPS and HTTP. */
public static final String HTTPS_HTTP = "https,http";
XML attribute for IDs.
/** * XML attribute for IDs. */
public static final String ID = "Id";
XML element for an invalid metadata name.
/** * XML element for an invalid metadata name. */
public static final String INVALID_METADATA_NAME = "x-ms-invalid-name";
XML element for the last modified date.
/** * XML element for the last modified date. */
public static final String LAST_MODIFIED_ELEMENT = "Last-Modified";
Lease break period max in seconds.
/** * Lease break period max in seconds. */
public static final int LEASE_BREAK_PERIOD_MAX = 60;
Lease break period min in seconds.
/** * Lease break period min in seconds. */
public static final int LEASE_BREAK_PERIOD_MIN = 0;
XML element for the lease duration.
/** * XML element for the lease duration. */
public static final String LEASE_DURATION_ELEMENT = "LeaseDuration";
Lease duration max in seconds.
/** * Lease duration max in seconds. */
public static final int LEASE_DURATION_MAX = 60;
Lease duration min in seconds.
/** * Lease duration min in seconds. */
public static final int LEASE_DURATION_MIN = 15;
XML element for the lease state.
/** * XML element for the lease state. */
public static final String LEASE_STATE_ELEMENT = "LeaseState";
XML element for the lease status.
/** * XML element for the lease status. */
public static final String LEASE_STATUS_ELEMENT = "LeaseStatus";
Constant signaling the resource is locked.
/** * Constant signaling the resource is locked. */
public static final String LOCKED_VALUE = "Locked";
XML element for a marker.
/** * XML element for a marker. */
public static final String MARKER_ELEMENT = "Marker";
The maximum size for Range ContentMD5.
/** * The maximum size for Range ContentMD5. */
public static int MAX_RANGE_CONTENT_MD5 = 4 * MB;
The maximum size of a BlockBlob block.
/** * The maximum size of a BlockBlob block. */
public static int MAX_BLOCK_SIZE = 100 * MB;
The maximum size of an AppendBlob block.
/** * The maximum size of an AppendBlob block. */
public static int MAX_APPEND_BLOCK_SIZE = 4 * MB;
The maximum write size that can uploaded to a PageBlob at once.
/** * The maximum write size that can uploaded to a PageBlob at once. */
public static int MAX_PAGE_WRITE_SIZE = 4 * MB;
The maximum write size for Files
/** * The maximum write size for Files */
public static int MAX_FILE_WRITE_SIZE = 4 * MB;
The minimum suggested write size for Files.
/** * The minimum suggested write size for Files. */
public static int MIN_PERMITTED_FILE_WRITE_SIZE = 512;
The maximum number of blocks.
/** * The maximum number of blocks. */
public static final long MAX_BLOCK_NUMBER = 50000;
The maximum size of a Block Blob.
/** * The maximum size of a Block Blob. */
public static final long MAX_BLOB_SIZE = Constants.MAX_BLOCK_NUMBER * Constants.MAX_BLOCK_SIZE;
The minimum suggested size of a block.
/** * The minimum suggested size of a block. */
public static final int MIN_PERMITTED_BLOCK_SIZE = 16 * Constants.KB;
The minimum size of a block for the large block upload strategy to be employed.
/** * The minimum size of a block for the large block upload strategy to be employed. */
public static int MIN_LARGE_BLOCK_SIZE = (4 * Constants.MB) + 1;
The default read buffer size used by the SubStream class.
/** * The default read buffer size used by the SubStream class. */
public static final int SUBSTREAM_BUFFER_SIZE = 4 * Constants.MB;
The default write size, in bytes, used by BlobOutputStream or FileOutputStream.
/** * The default write size, in bytes, used by {@link BlobOutputStream} or {@link FileOutputStream}. */
public static final int DEFAULT_STREAM_WRITE_IN_BYTES = 4 * Constants.MB;
The default minimum read size, in bytes, for a BlobInputStream or FileInputStream.
/** * The default minimum read size, in bytes, for a {@link BlobInputStream} or {@link FileInputStream}. */
public static final int DEFAULT_MINIMUM_READ_SIZE_IN_BYTES = 4 * Constants.MB;
The maximum size, in bytes, of a given stream mark operation.
/** * The maximum size, in bytes, of a given stream mark operation. */
// Note if BlobConstants.MAX_SINGLE_UPLOAD_BLOB_SIZE_IN_BYTES is updated then this needs to be as well. public static final int MAX_MARK_LENGTH = 256 * MB;
XML element for maximum results.
/** * XML element for maximum results. */
public static final String MAX_RESULTS_ELEMENT = "MaxResults";
Maximum number of shared access policy identifiers supported by server.
/** * Maximum number of shared access policy identifiers supported by server. */
public static final int MAX_SHARED_ACCESS_POLICY_IDENTIFIERS = 5;
Number of default concurrent requests for parallel operation.
/** * Number of default concurrent requests for parallel operation. */
public static final int MAXIMUM_SEGMENTED_RESULTS = 5000;
XML element for the metadata.
/** * XML element for the metadata. */
public static final String METADATA_ELEMENT = "Metadata";
XML element for names.
/** * XML element for names. */
public static final String NAME_ELEMENT = "Name";
XML element for the next marker.
/** * XML element for the next marker. */
public static final String NEXT_MARKER_ELEMENT = "NextMarker";
The size of a page, in bytes, in a page blob.
/** * The size of a page, in bytes, in a page blob. */
public static final int PAGE_SIZE = 512;
XML element for the permission of an access policy.
/** * XML element for the permission of an access policy. */
public static final String PERMISSION = "Permission";
XML element for a prefix.
/** * XML element for a prefix. */
public static final String PREFIX_ELEMENT = "Prefix";
XML element for properties.
/** * XML element for properties. */
public static final String PROPERTIES = "Properties";
XML element for public access
/** * XML element for public access */
public static final String PUBLIC_ACCESS_ELEMENT = "PublicAccess";
XML element for the server encryption status.
/** * XML element for the server encryption status. */
public static final String SERVER_ENCRYPTION_STATUS_ELEMENT = "ServerEncrypted";
XML element for a signed identifier.
/** * XML element for a signed identifier. */
public static final String SIGNED_IDENTIFIER_ELEMENT = "SignedIdentifier";
XML element for signed identifiers.
/** * XML element for signed identifiers. */
public static final String SIGNED_IDENTIFIERS_ELEMENT = "SignedIdentifiers";
XML element for the start time of an access policy.
/** * XML element for the start time of an access policy. */
public static final String START = "Start";
Constant for True.
/** * Constant for True. */
public static final String TRUE = "true";
Constant signaling the resource is unlocked.
/** * Constant signaling the resource is unlocked. */
public static final String UNLOCKED_VALUE = "Unlocked";
Constant signaling the resource lease duration, state or status is unspecified.
/** * Constant signaling the resource lease duration, state or status is unspecified. */
public static final String UNSPECIFIED_VALUE = "Unspecified";
XML element for the URL.
/** * XML element for the URL. */
public static final String URL_ELEMENT = "Url";
The default type for content-type and accept
/** * The default type for content-type and accept */
public static final String UTF8_CHARSET = "UTF-8";
Private Default Ctor
/** * Private Default Ctor */
private Constants() { // No op } }