@Generated(value="com.amazonaws:aws-java-sdk-code-generator") public class GetObjectResult extends AmazonWebServiceResult<ResponseMetadata> implements Serializable, Cloneable
Constructor and Description |
---|
GetObjectResult() |
Modifier and Type | Method and Description |
---|---|
GetObjectResult |
clone() |
boolean |
equals(Object obj) |
InputStream |
getBody()
The bytes of the object.
|
String |
getCacheControl()
An optional
CacheControl header that allows the caller to control the object's cache behavior. |
Long |
getContentLength()
The length of the object in bytes.
|
String |
getContentRange()
The range of bytes to retrieve.
|
String |
getContentType()
The content type of the object.
|
String |
getETag()
The ETag that represents a unique instance of the object.
|
Date |
getLastModified()
The date and time that the object was last modified.
|
Integer |
getStatusCode()
The HTML status code of the request.
|
int |
hashCode() |
void |
setBody(InputStream body)
The bytes of the object.
|
void |
setCacheControl(String cacheControl)
An optional
CacheControl header that allows the caller to control the object's cache behavior. |
void |
setContentLength(Long contentLength)
The length of the object in bytes.
|
void |
setContentRange(String contentRange)
The range of bytes to retrieve.
|
void |
setContentType(String contentType)
The content type of the object.
|
void |
setETag(String eTag)
The ETag that represents a unique instance of the object.
|
void |
setLastModified(Date lastModified)
The date and time that the object was last modified.
|
void |
setStatusCode(Integer statusCode)
The HTML status code of the request.
|
String |
toString()
Returns a string representation of this object.
|
GetObjectResult |
withBody(InputStream body)
The bytes of the object.
|
GetObjectResult |
withCacheControl(String cacheControl)
An optional
CacheControl header that allows the caller to control the object's cache behavior. |
GetObjectResult |
withContentLength(Long contentLength)
The length of the object in bytes.
|
GetObjectResult |
withContentRange(String contentRange)
The range of bytes to retrieve.
|
GetObjectResult |
withContentType(String contentType)
The content type of the object.
|
GetObjectResult |
withETag(String eTag)
The ETag that represents a unique instance of the object.
|
GetObjectResult |
withLastModified(Date lastModified)
The date and time that the object was last modified.
|
GetObjectResult |
withStatusCode(Integer statusCode)
The HTML status code of the request.
|
getSdkHttpMetadata, getSdkResponseMetadata, setSdkHttpMetadata, setSdkResponseMetadata
public void setBody(InputStream body)
The bytes of the object.
body
- The bytes of the object.public InputStream getBody()
The bytes of the object.
public GetObjectResult withBody(InputStream body)
The bytes of the object.
body
- The bytes of the object.public void setCacheControl(String cacheControl)
An optional CacheControl
header that allows the caller to control the object's cache behavior.
Headers can be passed in as specified in the HTTP spec at https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9.
Headers with a custom user-defined value are also accepted.
cacheControl
- An optional CacheControl
header that allows the caller to control the object's cache
behavior. Headers can be passed in as specified in the HTTP spec at https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9.
Headers with a custom user-defined value are also accepted.
public String getCacheControl()
An optional CacheControl
header that allows the caller to control the object's cache behavior.
Headers can be passed in as specified in the HTTP spec at https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9.
Headers with a custom user-defined value are also accepted.
CacheControl
header that allows the caller to control the object's cache
behavior. Headers can be passed in as specified in the HTTP spec at https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9.
Headers with a custom user-defined value are also accepted.
public GetObjectResult withCacheControl(String cacheControl)
An optional CacheControl
header that allows the caller to control the object's cache behavior.
Headers can be passed in as specified in the HTTP spec at https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9.
Headers with a custom user-defined value are also accepted.
cacheControl
- An optional CacheControl
header that allows the caller to control the object's cache
behavior. Headers can be passed in as specified in the HTTP spec at https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9.
Headers with a custom user-defined value are also accepted.
public void setContentRange(String contentRange)
The range of bytes to retrieve.
contentRange
- The range of bytes to retrieve.public String getContentRange()
The range of bytes to retrieve.
public GetObjectResult withContentRange(String contentRange)
The range of bytes to retrieve.
contentRange
- The range of bytes to retrieve.public void setContentLength(Long contentLength)
The length of the object in bytes.
contentLength
- The length of the object in bytes.public Long getContentLength()
The length of the object in bytes.
public GetObjectResult withContentLength(Long contentLength)
The length of the object in bytes.
contentLength
- The length of the object in bytes.public void setContentType(String contentType)
The content type of the object.
contentType
- The content type of the object.public String getContentType()
The content type of the object.
public GetObjectResult withContentType(String contentType)
The content type of the object.
contentType
- The content type of the object.public void setETag(String eTag)
The ETag that represents a unique instance of the object.
eTag
- The ETag that represents a unique instance of the object.public String getETag()
The ETag that represents a unique instance of the object.
public GetObjectResult withETag(String eTag)
The ETag that represents a unique instance of the object.
eTag
- The ETag that represents a unique instance of the object.public void setLastModified(Date lastModified)
The date and time that the object was last modified.
lastModified
- The date and time that the object was last modified.public Date getLastModified()
The date and time that the object was last modified.
public GetObjectResult withLastModified(Date lastModified)
The date and time that the object was last modified.
lastModified
- The date and time that the object was last modified.public void setStatusCode(Integer statusCode)
The HTML status code of the request. Status codes ranging from 200 to 299 indicate success. All other status codes indicate the type of error that occurred.
statusCode
- The HTML status code of the request. Status codes ranging from 200 to 299 indicate success. All other
status codes indicate the type of error that occurred.public Integer getStatusCode()
The HTML status code of the request. Status codes ranging from 200 to 299 indicate success. All other status codes indicate the type of error that occurred.
public GetObjectResult withStatusCode(Integer statusCode)
The HTML status code of the request. Status codes ranging from 200 to 299 indicate success. All other status codes indicate the type of error that occurred.
statusCode
- The HTML status code of the request. Status codes ranging from 200 to 299 indicate success. All other
status codes indicate the type of error that occurred.public String toString()
toString
in class Object
Object.toString()
public GetObjectResult clone()