Interface RangeAwareResource
- All Superinterfaces:
org.springframework.core.io.InputStreamSource
,org.springframework.core.io.Resource
- All Known Implementing Classes:
RangeAwareUrlResource
,S3Resource
,WebDavResource
public interface RangeAwareResource
extends org.springframework.core.io.Resource
Extension of Spring's
Resource
that provides random access to the content.- Author:
- avasquez
-
Method Summary
Modifier and TypeMethodDescriptiongetInputStream
(long start, long end) Returns a range of bytes from the resource's content.Methods inherited from interface org.springframework.core.io.InputStreamSource
getInputStream
Methods inherited from interface org.springframework.core.io.Resource
contentLength, createRelative, exists, getContentAsByteArray, getContentAsString, getDescription, getFile, getFilename, getURI, getURL, isFile, isOpen, isReadable, lastModified, readableChannel
-
Method Details
-
getInputStream
Returns a range of bytes from the resource's content.- Parameters:
start
- the start of the rangeend
- the end of the range- Returns:
- an input stream with the content range
- Throws:
IOException
- if an IO error occurs
-