Package net.solarnetwork.common.s3
Class S3ObjectRef
java.lang.Object
net.solarnetwork.common.s3.S3ObjectRef
- All Implemented Interfaces:
S3ObjectReference
An immutable reference to an S3 object.
- Version:
- 1.0
- Author:
- matt
-
Constructor Summary
ConstructorsConstructorDescriptionS3ObjectRef(String key) Constructor.S3ObjectRef(String key, long size, Date modified, URL url) Constructor. -
Method Summary
-
Constructor Details
-
S3ObjectRef
Constructor.- Parameters:
key- the key
-
S3ObjectRef
Constructor.- Parameters:
key- the keysize- the sizemodified- the modification dateurl- the URL
-
-
Method Details
-
toString
-
getKey
Description copied from interface:S3ObjectReferenceGet the object key.- Specified by:
getKeyin interfaceS3ObjectReference- Returns:
- the key
-
getSize
public long getSize()Description copied from interface:S3ObjectReferenceGet the object size.- Specified by:
getSizein interfaceS3ObjectReference- Returns:
- the size, in bytes
-
getModified
Description copied from interface:S3ObjectReferenceGet the modification date.- Specified by:
getModifiedin interfaceS3ObjectReference- Returns:
- the modified date
-
getURL
Description copied from interface:S3ObjectReferenceGet a URL for this object reference.- Specified by:
getURLin interfaceS3ObjectReference- Returns:
- a URL for this object
-
hashCode
public int hashCode() -
equals
Test for equality.Only the
keyproperty is compared for equality.
-