public class ResponseHeaderOverrides extends AmazonWebServiceRequest
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
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
RESPONSE_HEADER_CACHE_CONTROL |
static java.lang.String |
RESPONSE_HEADER_CONTENT_DISPOSITION |
static java.lang.String |
RESPONSE_HEADER_CONTENT_ENCODING |
static java.lang.String |
RESPONSE_HEADER_CONTENT_LANGUAGE |
static java.lang.String |
RESPONSE_HEADER_CONTENT_TYPE |
static java.lang.String |
RESPONSE_HEADER_EXPIRES |
| Constructor and Description |
|---|
ResponseHeaderOverrides() |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getCacheControl()
Returns the cache control response header override if it has been
specified, or null otherwise.
|
java.lang.String |
getContentDisposition()
Returns the content disposition response header override if it has been
specified, or null otherwise.
|
java.lang.String |
getContentEncoding()
Returns the content encoding response header override if it has been
specified, or null otherwise.
|
java.lang.String |
getContentLanguage()
Returns the content language response header override if it has been
specified, or null otherwise.
|
java.lang.String |
getContentType()
Returns the content type response header override if it has been
specified, or null otherwise.
|
java.lang.String |
getExpires()
Returns the expires response header override if it has been specified, or
null otherwise.
|
void |
setCacheControl(java.lang.String cacheControl)
Sets the cache control response header.
|
void |
setContentDisposition(java.lang.String contentDisposition)
Sets the content disposition response header override.
|
void |
setContentEncoding(java.lang.String contentEncoding)
Sets the content encoding response header override.
|
void |
setContentLanguage(java.lang.String contentLanguage)
Sets the content language response header override
|
void |
setContentType(java.lang.String contentType)
Sets the content type response header override.
|
void |
setExpires(java.lang.String expires)
Sets the expires response header override.
|
ResponseHeaderOverrides |
withCacheControl(java.lang.String cacheControl)
Sets the cache control response header.
|
ResponseHeaderOverrides |
withContentDisposition(java.lang.String contentDisposition)
Sets the content disposition response header override.
|
ResponseHeaderOverrides |
withContentEncoding(java.lang.String contentEncoding)
Sets the content encoding response header override.
|
ResponseHeaderOverrides |
withContentLanguage(java.lang.String contentLanguage)
Sets the content language response header override
|
ResponseHeaderOverrides |
withContentType(java.lang.String contentType)
Sets the content type response header override.
|
ResponseHeaderOverrides |
withExpires(java.lang.String expires)
Sets the expires response header override.
|
clone, getCloneRoot, getCloneSource, getGeneralProgressListener, getRequestClientOptions, getRequestCredentials, getRequestMetricCollector, setGeneralProgressListener, setRequestCredentials, setRequestMetricCollector, withGeneralProgressListener, withRequestMetricCollectorpublic static final java.lang.String RESPONSE_HEADER_CONTENT_TYPE
public static final java.lang.String RESPONSE_HEADER_CONTENT_LANGUAGE
public static final java.lang.String RESPONSE_HEADER_EXPIRES
public static final java.lang.String RESPONSE_HEADER_CACHE_CONTROL
public static final java.lang.String RESPONSE_HEADER_CONTENT_DISPOSITION
public static final java.lang.String RESPONSE_HEADER_CONTENT_ENCODING
public java.lang.String getContentType()
RESPONSE_HEADER_CONTENT_TYPEpublic void setContentType(java.lang.String contentType)
RESPONSE_HEADER_CONTENT_TYPEpublic ResponseHeaderOverrides withContentType(java.lang.String contentType)
ResponseHeaderOverrides object for method chaining.RESPONSE_HEADER_CONTENT_TYPEpublic java.lang.String getContentLanguage()
RESPONSE_HEADER_CONTENT_LANGUAGEpublic void setContentLanguage(java.lang.String contentLanguage)
RESPONSE_HEADER_CONTENT_LANGUAGEpublic ResponseHeaderOverrides withContentLanguage(java.lang.String contentLanguage)
ResponseHeaderOverrides object for method chaining.RESPONSE_HEADER_CONTENT_LANGUAGEpublic java.lang.String getExpires()
RESPONSE_HEADER_EXPIRESpublic void setExpires(java.lang.String expires)
RESPONSE_HEADER_EXPIRESpublic ResponseHeaderOverrides withExpires(java.lang.String expires)
ResponseHeaderOverrides object for method chaining.RESPONSE_HEADER_EXPIRESpublic java.lang.String getCacheControl()
RESPONSE_HEADER_CACHE_CONTROLpublic void setCacheControl(java.lang.String cacheControl)
RESPONSE_HEADER_CACHE_CONTROLpublic ResponseHeaderOverrides withCacheControl(java.lang.String cacheControl)
ResponseHeaderOverrides object for method chaining.RESPONSE_HEADER_CACHE_CONTROLpublic java.lang.String getContentDisposition()
RESPONSE_HEADER_CONTENT_DISPOSITIONpublic void setContentDisposition(java.lang.String contentDisposition)
RESPONSE_HEADER_CONTENT_DISPOSITIONpublic ResponseHeaderOverrides withContentDisposition(java.lang.String contentDisposition)
ResponseHeaderOverrides object for method chaining.RESPONSE_HEADER_CONTENT_DISPOSITIONpublic java.lang.String getContentEncoding()
RESPONSE_HEADER_CONTENT_ENCODINGpublic void setContentEncoding(java.lang.String contentEncoding)
RESPONSE_HEADER_CONTENT_ENCODINGpublic ResponseHeaderOverrides withContentEncoding(java.lang.String contentEncoding)
ResponseHeaderOverrides object for method chaining.RESPONSE_HEADER_CONTENT_ENCODINGCopyright © 2018 Amazon Web Services, Inc. All Rights Reserved.