Class S3Content

java.lang.Object
org.craftercms.engine.store.s3.S3Content
All Implemented Interfaces:
org.craftercms.core.service.Content

public class S3Content extends Object implements org.craftercms.core.service.Content
Represents the content of an S3 object.
Since:
3.1.4
Author:
jross, avasquez
  • Field Details

    • lastModified

      protected long lastModified
      When the file was last modified.
    • length

      protected long length
      The length of the file.
    • content

      protected byte[] content
      The content of the file.
  • Constructor Details

    • S3Content

      public S3Content(com.amazonaws.services.s3.model.ObjectMetadata objectMetadata, boolean shouldCache, Supplier<com.amazonaws.services.s3.model.S3Object> supplier)
      Parameters:
      objectMetadata - S3 Object metadata
      shouldCache - indicates if the object content should be loaded and cached in memory.
      supplier - S3Object Supplier to get the actual content
  • Method Details

    • getLastModified

      public long getLastModified()
      Specified by:
      getLastModified in interface org.craftercms.core.service.Content
    • getLength

      public long getLength()
      Specified by:
      getLength in interface org.craftercms.core.service.Content
    • getInputStream

      public InputStream getInputStream()
      Specified by:
      getInputStream in interface org.craftercms.core.service.Content