Package com.amazonaws.services.s3.model
Class ResponseHeaderOverrides
java.lang.Object
com.amazonaws.services.s3.model.ResponseHeaderOverrides
- All Implemented Interfaces:
Serializable
Container object for overriding headers on a
GetObjectRequest
or
GeneratePresignedUrlRequest
response. Response headers can be set on
a GetObjectRequest
or a GeneratePresignedUrlRequest
in order
to control particular HTTP headers in the service response from those service
interfaces.
For example, a client could dynamically change the apparent Content-Disposition header of a single object, so that it appears to have a different file name for different callers. One client could be configured return the object with
Content-Disposition: attachment; filename=FileName1.exewhile another could return that same object with headers
Content-Disposition: attachment; filename=FileName2.pdf
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the cache control response header override if it has been specified, or null otherwise.Returns the content disposition response header override if it has been specified, or null otherwise.Returns the content encoding response header override if it has been specified, or null otherwise.Returns the content language response header override if it has been specified, or null otherwise.Returns the content type response header override if it has been specified, or null otherwise.Returns the expires response header override if it has been specified, or null otherwise.void
setCacheControl
(String cacheControl) Sets the cache control response header.void
setContentDisposition
(String contentDisposition) Sets the content disposition response header override.void
setContentEncoding
(String contentEncoding) Sets the content encoding response header override.void
setContentLanguage
(String contentLanguage) Sets the content language response header overridevoid
setContentType
(String contentType) Sets the content type response header override.void
setExpires
(String expires) Sets the expires response header override.withCacheControl
(String cacheControl) Sets the cache control response header.withContentDisposition
(String contentDisposition) Sets the content disposition response header override.withContentEncoding
(String contentEncoding) Sets the content encoding response header override.withContentLanguage
(String contentLanguage) Sets the content language response header overridewithContentType
(String contentType) Sets the content type response header override.withExpires
(String expires) Sets the expires response header override.
-
Field Details
-
RESPONSE_HEADER_CONTENT_TYPE
- See Also:
-
RESPONSE_HEADER_CONTENT_LANGUAGE
- See Also:
-
RESPONSE_HEADER_EXPIRES
- See Also:
-
RESPONSE_HEADER_CACHE_CONTROL
- See Also:
-
RESPONSE_HEADER_CONTENT_DISPOSITION
- See Also:
-
RESPONSE_HEADER_CONTENT_ENCODING
- See Also:
-
-
Constructor Details
-
ResponseHeaderOverrides
public ResponseHeaderOverrides()
-
-
Method Details
-
getContentType
Returns the content type response header override if it has been specified, or null otherwise.- Returns:
- Returns the content type response header override if it has been specified, or null otherwise.
- See Also:
-
setContentType
Sets the content type response header override.- See Also:
-
withContentType
Sets the content type response header override.- Returns:
- This
ResponseHeaderOverrides
object for method chaining. - See Also:
-
getContentLanguage
Returns the content language response header override if it has been specified, or null otherwise.- Returns:
- Returns the content language response header override if it has been specified, or null otherwise.
- See Also:
-
setContentLanguage
Sets the content language response header override- See Also:
-
withContentLanguage
Sets the content language response header override- Returns:
- This
ResponseHeaderOverrides
object for method chaining. - See Also:
-
getExpires
Returns the expires response header override if it has been specified, or null otherwise.- Returns:
- Returns the expires response header override if it has been specified, or null otherwise.
- See Also:
-
setExpires
Sets the expires response header override.- See Also:
-
withExpires
Sets the expires response header override.- Returns:
- This
ResponseHeaderOverrides
object for method chaining. - See Also:
-
getCacheControl
Returns the cache control response header override if it has been specified, or null otherwise.- Returns:
- Returns the cache control response header override if it has been specified, or null otherwise.
- See Also:
-
setCacheControl
Sets the cache control response header.- See Also:
-
withCacheControl
Sets the cache control response header.- Returns:
- This
ResponseHeaderOverrides
object for method chaining. - See Also:
-
getContentDisposition
Returns the content disposition response header override if it has been specified, or null otherwise.- Returns:
- Returns the content disposition response header override if it has been specified, or null otherwise.
- See Also:
-
setContentDisposition
Sets the content disposition response header override.- See Also:
-
withContentDisposition
Sets the content disposition response header override.- Returns:
- This
ResponseHeaderOverrides
object for method chaining. - See Also:
-
getContentEncoding
Returns the content encoding response header override if it has been specified, or null otherwise.- Returns:
- Returns the content encoding response header override if it has been specified, or null otherwise.
- See Also:
-
setContentEncoding
Sets the content encoding response header override.- See Also:
-
withContentEncoding
Sets the content encoding response header override.- Returns:
- This
ResponseHeaderOverrides
object for method chaining. - See Also:
-