Java Code Examples for com.amazonaws.services.s3.model.ObjectMetadata.getLastModified()

The following are Jave code examples for showing how to use getLastModified() of the com.amazonaws.services.s3.model.ObjectMetadata class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
Example 1
Project: Reer   File: S3Resource.java   Source Code and License Vote up 5 votes
public ExternalResourceMetaData getMetaData() {
    ObjectMetadata objectMetadata = s3Object.getObjectMetadata();
    Date lastModified = objectMetadata.getLastModified();
    return new DefaultExternalResourceMetaData(uri,
            lastModified.getTime(),
            getContentLength(),
            s3Object.getObjectMetadata().getContentType(),
            s3Object.getObjectMetadata().getETag(),
            null); // Passing null for sha1 - TODO - consider using the etag which is an MD5 hash of the file (when less than 5Gb)
}