Class SimpleStorageRangeResource

  • All Implemented Interfaces:
    org.springframework.core.io.InputStreamSource, org.springframework.core.io.Resource, org.springframework.core.io.WritableResource

    public final class SimpleStorageRangeResource
    extends io.awspring.cloud.core.io.s3.SimpleStorageResource
    This class extends SimpleStorageResource in order to efficiently handle range requests. Rather than fetching the entire object and let the web tier skip, it only downloads the relevant object region and returns a composite input stream that skips the unrequested bytes.
    Since:
    4.0.0
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean exists()  
      java.io.InputStream getInputStream()
      • Methods inherited from class io.awspring.cloud.core.io.s3.SimpleStorageResource

        contentLength, createRelative, getAmazonS3, getDescription, getFile, getFilename, getOutputStream, getS3Uri, getURL, isWritable, lastModified
      • Methods inherited from class org.springframework.core.io.AbstractResource

        equals, getFileForLastModifiedCheck, getURI, hashCode, isFile, isOpen, isReadable, readableChannel, toString
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface org.springframework.core.io.Resource

        getURI, isFile, isOpen, isReadable, readableChannel
      • Methods inherited from interface org.springframework.core.io.WritableResource

        writableChannel
    • Method Detail

      • getInputStream

        public java.io.InputStream getInputStream()
                                           throws java.io.IOException
        Specified by:
        getInputStream in interface org.springframework.core.io.InputStreamSource
        Overrides:
        getInputStream in class io.awspring.cloud.core.io.s3.SimpleStorageResource
        Throws:
        java.io.IOException
      • exists

        public boolean exists()
        Specified by:
        exists in interface org.springframework.core.io.Resource
        Overrides:
        exists in class io.awspring.cloud.core.io.s3.SimpleStorageResource