SharedAccessHeaders Class

  • java.lang.Object
    • com.microsoft.azure.storage.SharedAccessHeaders

public class SharedAccessHeaders

RESERVED FOR INTERNAL USE. Represents the optional headers that can be returned using SAS.

Constructor Summary

Constructor Description
SharedAccessHeaders()

Initializes a new instance of the SharedAccessHeaders class.

SharedAccessHeaders(boolean preserveRawValue)

Initializes a new instance of the SharedAccessHeaders class. The empty constructor should be preferred and this option should only be used by customers who are sure they do not want the safety usually afforded by this SDK when constructing a sas.

The header values are typically decoded before building the sas token. This can cause problems if the desired value for one of the headers contains something that looks like encoding. Setting this flag to true will ensure that the value of these headers are preserved as set on this object when constructing the sas.

Note that these values are preserved by encoding them here so that the decoding which happens at sas construction time returns them to the original values. So if get is called on this object when preserveRawValues was set to true, the value returned will be percent encoded.

SharedAccessHeaders(SharedAccessHeaders other)

Initializes a new instance of the SharedAccessHeaders class based on an existing instance.

Method Summary

Modifier and Type Method and Description
String getCacheControl()

Gets the cache control header.

String getContentDisposition()

Gets the content disposition header.

String getContentEncoding()

Gets the content encoding header.

String getContentLanguage()

Gets the content language header.

String getContentType()

Gets the content type header.

void setCacheControl(String cacheControl)

Sets the cache control header.

void setContentDisposition(String contentDisposition)

Sets the content disposition header.

void setContentEncoding(String contentEncoding)

Sets the content encoding header.

void setContentLanguage(String contentLanguage)

Sets the content language header.

void setContentType(String contentType)

Sets the content type header.

Constructor Details

SharedAccessHeaders

public SharedAccessHeaders()

Initializes a new instance of the SharedAccessHeaders class.

SharedAccessHeaders

public SharedAccessHeaders(boolean preserveRawValue)

Initializes a new instance of the SharedAccessHeaders class. The empty constructor should be preferred and this option should only be used by customers who are sure they do not want the safety usually afforded by this SDK when constructing a sas.

The header values are typically decoded before building the sas token. This can cause problems if the desired value for one of the headers contains something that looks like encoding. Setting this flag to true will ensure that the value of these headers are preserved as set on this object when constructing the sas.

Note that these values are preserved by encoding them here so that the decoding which happens at sas construction time returns them to the original values. So if get is called on this object when preserveRawValues was set to true, the value returned will be percent encoded.

Parameters:

preserveRawValue - Whether the sdk should preserve the raw value of these headers.

SharedAccessHeaders

public SharedAccessHeaders(SharedAccessHeaders other)

Initializes a new instance of the SharedAccessHeaders class based on an existing instance.

Parameters:

other - A SharedAccessHeaders object which specifies the set of properties to clone.

Method Details

getCacheControl

public String getCacheControl()

Gets the cache control header.

Returns:

A String which represents the cache control header.

getContentDisposition

public String getContentDisposition()

Gets the content disposition header.

Returns:

A String which represents the content disposition header.

getContentEncoding

public String getContentEncoding()

Gets the content encoding header.

Returns:

A String which represents the content encoding header.

getContentLanguage

public String getContentLanguage()

Gets the content language header.

Returns:

A String which represents the content language header.

getContentType

public String getContentType()

Gets the content type header.

Returns:

A String which represents the content type header.

setCacheControl

public void setCacheControl(String cacheControl)

Sets the cache control header.

Parameters:

cacheControl - A String which specifies the cache control header.

setContentDisposition

public void setContentDisposition(String contentDisposition)

Sets the content disposition header.

Parameters:

contentDisposition - A String which specifies the content disposition header.

setContentEncoding

public void setContentEncoding(String contentEncoding)

Sets the content encoding header.

Parameters:

contentEncoding - A String which specifies the content encoding header.

setContentLanguage

public void setContentLanguage(String contentLanguage)

Sets the content language header.

Parameters:

contentLanguage - A String which specifies the content language header.

setContentType

public void setContentType(String contentType)

Sets the content type header.

Parameters:

contentType - A String which specifies the content type header.

Applies to