Package org.opencms.db.storage
Interface I_CmsStorageDelivery
- All Known Implementing Classes:
CmsFsStorage,CmsS3Storage
public interface I_CmsStorageDelivery
Optional HTTP delivery capability for backends of the OpenCms deduplicating media storage engine (DMSE).
This capability provides content streaming and optional byte-range delivery. A backend can support DMSE content storage and deduplication without implementing this delivery interface.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionvoidstreamRangeTo(CmsDbContext dbc, String hash, long start, long length, OutputStream out) Streams a byte range to the given output stream.voidstreamTo(CmsDbContext dbc, String hash, OutputStream out) Streams the content to the given output stream.booleanReturns if range delivery is supported.
-
Method Details
-
streamRangeTo
void streamRangeTo(CmsDbContext dbc, String hash, long start, long length, OutputStream out) throws Exception Streams a byte range to the given output stream.- Parameters:
dbc- the database contexthash- the SHA-512 content hashstart- the first byte to streamlength- the number of bytes to streamout- the output stream to write to- Throws:
Exception- if streaming fails
-
streamTo
Streams the content to the given output stream.- Parameters:
dbc- the database contexthash- the SHA-512 content hashout- the output stream to write to- Throws:
Exception- if streaming fails
-
supportsRangeDelivery
boolean supportsRangeDelivery()Returns if range delivery is supported.- Returns:
trueif byte range delivery is supported
-