@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 path to the file outside of the container.
|
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 path to the file outside of the container.
|
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; useful for testing and debugging.
|
GetObjectResult |
withBody(InputStream body)
The path to the file outside of the container.
|
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 path to the file outside of the container. The file name can include or omit an extension.
Example 1: If the file is stored on a remote server that has been mounted to the workstation on which the REST
API command is being run, the path could be the absolute path \mount\assets\mlaw.avi
or the
relative path ..\..\mount\assets\movies\premium\mlaw.avi
.
Example 2: If the file is stored on a remote server that is not mounted, the path could be
https:\\192.0.2.15\movies\premium\mlaw.avi
.
body
- The path to the file outside of the container. The file name can include or omit an extension.
Example 1: If the file is stored on a remote server that has been mounted to the workstation on which the
REST API command is being run, the path could be the absolute path \mount\assets\mlaw.avi
or
the relative path ..\..\mount\assets\movies\premium\mlaw.avi
.
Example 2: If the file is stored on a remote server that is not mounted, the path could be
https:\\192.0.2.15\movies\premium\mlaw.avi
.
public InputStream getBody()
The path to the file outside of the container. The file name can include or omit an extension.
Example 1: If the file is stored on a remote server that has been mounted to the workstation on which the REST
API command is being run, the path could be the absolute path \mount\assets\mlaw.avi
or the
relative path ..\..\mount\assets\movies\premium\mlaw.avi
.
Example 2: If the file is stored on a remote server that is not mounted, the path could be
https:\\192.0.2.15\movies\premium\mlaw.avi
.
Example 1: If the file is stored on a remote server that has been mounted to the workstation on which the
REST API command is being run, the path could be the absolute path \mount\assets\mlaw.avi
or the relative path ..\..\mount\assets\movies\premium\mlaw.avi
.
Example 2: If the file is stored on a remote server that is not mounted, the path could be
https:\\192.0.2.15\movies\premium\mlaw.avi
.
public GetObjectResult withBody(InputStream body)
The path to the file outside of the container. The file name can include or omit an extension.
Example 1: If the file is stored on a remote server that has been mounted to the workstation on which the REST
API command is being run, the path could be the absolute path \mount\assets\mlaw.avi
or the
relative path ..\..\mount\assets\movies\premium\mlaw.avi
.
Example 2: If the file is stored on a remote server that is not mounted, the path could be
https:\\192.0.2.15\movies\premium\mlaw.avi
.
body
- The path to the file outside of the container. The file name can include or omit an extension.
Example 1: If the file is stored on a remote server that has been mounted to the workstation on which the
REST API command is being run, the path could be the absolute path \mount\assets\mlaw.avi
or
the relative path ..\..\mount\assets\movies\premium\mlaw.avi
.
Example 2: If the file is stored on a remote server that is not mounted, the path could be
https:\\192.0.2.15\movies\premium\mlaw.avi
.
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()
Copyright © 2013 Amazon Web Services, Inc. All Rights Reserved.