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, withRequestMetricCollector
public 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_TYPE
public void setContentType(java.lang.String contentType)
RESPONSE_HEADER_CONTENT_TYPE
public ResponseHeaderOverrides withContentType(java.lang.String contentType)
ResponseHeaderOverrides
object for method chaining.RESPONSE_HEADER_CONTENT_TYPE
public java.lang.String getContentLanguage()
RESPONSE_HEADER_CONTENT_LANGUAGE
public void setContentLanguage(java.lang.String contentLanguage)
RESPONSE_HEADER_CONTENT_LANGUAGE
public ResponseHeaderOverrides withContentLanguage(java.lang.String contentLanguage)
ResponseHeaderOverrides
object for method chaining.RESPONSE_HEADER_CONTENT_LANGUAGE
public java.lang.String getExpires()
RESPONSE_HEADER_EXPIRES
public void setExpires(java.lang.String expires)
RESPONSE_HEADER_EXPIRES
public ResponseHeaderOverrides withExpires(java.lang.String expires)
ResponseHeaderOverrides
object for method chaining.RESPONSE_HEADER_EXPIRES
public java.lang.String getCacheControl()
RESPONSE_HEADER_CACHE_CONTROL
public void setCacheControl(java.lang.String cacheControl)
RESPONSE_HEADER_CACHE_CONTROL
public ResponseHeaderOverrides withCacheControl(java.lang.String cacheControl)
ResponseHeaderOverrides
object for method chaining.RESPONSE_HEADER_CACHE_CONTROL
public java.lang.String getContentDisposition()
RESPONSE_HEADER_CONTENT_DISPOSITION
public void setContentDisposition(java.lang.String contentDisposition)
RESPONSE_HEADER_CONTENT_DISPOSITION
public ResponseHeaderOverrides withContentDisposition(java.lang.String contentDisposition)
ResponseHeaderOverrides
object for method chaining.RESPONSE_HEADER_CONTENT_DISPOSITION
public java.lang.String getContentEncoding()
RESPONSE_HEADER_CONTENT_ENCODING
public void setContentEncoding(java.lang.String contentEncoding)
RESPONSE_HEADER_CONTENT_ENCODING
public ResponseHeaderOverrides withContentEncoding(java.lang.String contentEncoding)
ResponseHeaderOverrides
object for method chaining.RESPONSE_HEADER_CONTENT_ENCODING
Copyright © 2018 Amazon Web Services, Inc. All Rights Reserved.