Package net.solarnetwork.common.s3.sdk
Class SdkS3Object
java.lang.Object
net.solarnetwork.common.s3.sdk.SdkS3Object
- All Implemented Interfaces:
S3Object,S3ObjectMetadata,net.solarnetwork.io.ResourceMetadata,net.solarnetwork.io.ResourceMetadataHolder,org.springframework.core.io.InputStreamSource
AWS SDK implementation of
S3Object.- Version:
- 1.1
- Author:
- matt
-
Field Summary
Fields inherited from interface net.solarnetwork.io.ResourceMetadata
CONTENT_TYPE_KEY, DEFAULT_CONTENT_TYPE, MODIFIED_KEYFields inherited from interface net.solarnetwork.common.s3.S3ObjectMetadata
SIZE_KEY, STORAGE_CLASS_KEY -
Constructor Summary
ConstructorsConstructorDescriptionSdkS3Object(com.amazonaws.services.s3.model.S3Object s3Object, URL url) Constructor. -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.solarnetwork.io.ResourceMetadata
asCustomMap, asMap, asStandardMapMethods inherited from interface net.solarnetwork.common.s3.S3ObjectMetadata
isCustomKey
-
Constructor Details
-
SdkS3Object
Constructor.- Parameters:
s3Object- the objecturl- the URL
-
-
Method Details
-
getInputStream
- Specified by:
getInputStreamin interfaceorg.springframework.core.io.InputStreamSource- Throws:
IOException
-
getMetadata
Description copied from interface:S3ObjectGet the metadata associated with this object.- Specified by:
getMetadatain interfacenet.solarnetwork.io.ResourceMetadataHolder- Specified by:
getMetadatain interfaceS3Object- Returns:
- the metadata
-
getModified
- Specified by:
getModifiedin interfacenet.solarnetwork.io.ResourceMetadata
-
getSize
public long getSize()Description copied from interface:S3ObjectMetadataGet the object's content size.- Specified by:
getSizein interfaceS3ObjectMetadata- Returns:
- the size, in bytes
-
getStorageClass
Description copied from interface:S3ObjectMetadataGet the object storage class key to use.- Specified by:
getStorageClassin interfaceS3ObjectMetadata- Returns:
- the storage class
-
getURL
Description copied from interface:S3ObjectGet a URL for this object. -
getContentType
public org.springframework.util.MimeType getContentType()- Specified by:
getContentTypein interfacenet.solarnetwork.io.ResourceMetadata
-
populateMap
- Specified by:
populateMapin interfacenet.solarnetwork.io.ResourceMetadata
-