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

public class SdkS3Object extends Object implements S3Object, S3ObjectMetadata
AWS SDK implementation of S3Object.
Version:
1.1
Author:
matt
  • Constructor Details

    • SdkS3Object

      public SdkS3Object(com.amazonaws.services.s3.model.S3Object s3Object, URL url)
      Constructor.
      Parameters:
      s3Object - the object
      url - the URL
  • Method Details

    • getInputStream

      public InputStream getInputStream() throws IOException
      Specified by:
      getInputStream in interface org.springframework.core.io.InputStreamSource
      Throws:
      IOException
    • getMetadata

      public S3ObjectMetadata getMetadata()
      Description copied from interface: S3Object
      Get the metadata associated with this object.
      Specified by:
      getMetadata in interface net.solarnetwork.io.ResourceMetadataHolder
      Specified by:
      getMetadata in interface S3Object
      Returns:
      the metadata
    • getModified

      public Date getModified()
      Specified by:
      getModified in interface net.solarnetwork.io.ResourceMetadata
    • getSize

      public long getSize()
      Description copied from interface: S3ObjectMetadata
      Get the object's content size.
      Specified by:
      getSize in interface S3ObjectMetadata
      Returns:
      the size, in bytes
    • getStorageClass

      public String getStorageClass()
      Description copied from interface: S3ObjectMetadata
      Get the object storage class key to use.
      Specified by:
      getStorageClass in interface S3ObjectMetadata
      Returns:
      the storage class
    • getURL

      public URL getURL()
      Description copied from interface: S3Object
      Get a URL for this object.
      Specified by:
      getURL in interface S3Object
      Returns:
      a URL for this object
    • getContentType

      public org.springframework.util.MimeType getContentType()
      Specified by:
      getContentType in interface net.solarnetwork.io.ResourceMetadata
    • populateMap

      public void populateMap(Map<String,Object> map)
      Specified by:
      populateMap in interface net.solarnetwork.io.ResourceMetadata