|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.amazonaws.services.s3.model.S3Object
public class S3Object
Represents an object stored in Amazon S3. This object contains the data content and the object metadata stored by Amazon S3, such as content type, content length, etc.
ObjectMetadata
Constructor Summary | |
---|---|
S3Object()
|
Method Summary | |
---|---|
String |
getBucketName()
Gets the name of the bucket in which this object is contained. |
String |
getKey()
Gets the key under which this object is stored. |
S3ObjectInputStream |
getObjectContent()
Gets an input stream containing the contents of this object. |
ObjectMetadata |
getObjectMetadata()
Gets the metadata stored by Amazon S3 for this object. |
void |
setBucketName(String bucketName)
Sets the name of the bucket in which this object is contained. |
void |
setKey(String key)
Sets the key under which this object is stored. |
void |
setObjectContent(InputStream objectContent)
Sets the input stream containing this object's contents. |
void |
setObjectContent(S3ObjectInputStream objectContent)
Sets the input stream containing this object's contents. |
void |
setObjectMetadata(ObjectMetadata metadata)
Sets the object metadata for this object. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public S3Object()
Method Detail |
---|
public ObjectMetadata getObjectMetadata()
ObjectMetadata
object includes any custom user metadata supplied by the
caller when the object was uploaded, as well as HTTP metadata such as
content length and content type.
getObjectContent()
public void setObjectMetadata(ObjectMetadata metadata)
NOTE: This does not update the object metadata stored in Amazon
S3, but only updates this object in local memory. To update an object's
metadata in S3, use AmazonS3.copyObject(CopyObjectRequest)
to
copy the object to a new (or the same location) and specify new object
metadata then.
metadata
- The new metadata to set for this object in memory.public S3ObjectInputStream getObjectContent()
getObjectMetadata()
,
setObjectContent(InputStream)
public void setObjectContent(S3ObjectInputStream objectContent)
objectContent
- The input stream containing this object's contents.getObjectContent()
public void setObjectContent(InputStream objectContent)
objectContent
- The input stream containing this object's contents. Will get
wrapped in an S3ObjectInputStream.getObjectContent()
public String getBucketName()
setBucketName(String)
public void setBucketName(String bucketName)
bucketName
- The name of the bucket containing this object.getBucketName()
public String getKey()
setKey(String)
public void setKey(String key)
key
- The key under which this object is stored.getKey()
public String toString()
toString
in class Object
Object.toString()
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |