Class SimpleStorageRangeResource
java.lang.Object
org.springframework.core.io.AbstractResource
io.awspring.cloud.s3.S3Resource
com.netflix.genie.common.internal.aws.s3.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.s3.S3Resource
This class extends
S3Resource
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
-
Field Summary
Fields inherited from class io.awspring.cloud.s3.S3Resource
location, s3Client, s3OutputStreamProvider
-
Method Summary
Methods inherited from class io.awspring.cloud.s3.S3Resource
contentLength, contentType, create, createRelative, getDescription, getFile, getFilename, getLocation, getOutputStream, getURL, lastModified, metadata, setObjectMetadata
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
getContentAsByteArray, getContentAsString, getURI, isFile, isOpen, isReadable, readableChannel
Methods inherited from interface org.springframework.core.io.WritableResource
isWritable, writableChannel
-
Method Details
-
getInputStream
- Specified by:
getInputStream
in interfaceorg.springframework.core.io.InputStreamSource
- Overrides:
getInputStream
in classio.awspring.cloud.s3.S3Resource
- Throws:
IOException
-
exists
public boolean exists()- Specified by:
exists
in interfaceorg.springframework.core.io.Resource
- Overrides:
exists
in classio.awspring.cloud.s3.S3Resource
-