Package com.pkgrove.pkgrovekit.storage
Interface ContentSource
-
- All Implemented Interfaces:
public interface ContentSourceStreaming content for uploads (HEL-236 guarantee 1). A source is a RECIPE for a stream, not a buffer: open returns a fresh stream per call and the store reads it incrementally.
repeatable is the retry contract (HEL-236 guarantee 4): a repeatable source can be re-opened after a transport failure, so the write is SAFE to retry; a one-shot source cannot, and an implementation must fail visibly (StorageIoException with
retrySafe = false) instead of silently re-sending a half-consumed stream.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public classContentSource.Companion
-
Method Summary
Modifier and Type Method Description abstract InputStreamopen()A FRESH stream positioned at the start of the content. abstract LonggetLengthBytes()Exact content length; null = unknown (multipart-only territory). abstract BooleangetRepeatable()True when open may be called more than once (retry-safe). -
-
Method Detail
-
open
abstract InputStream open()
A FRESH stream positioned at the start of the content.
-
getLengthBytes
abstract Long getLengthBytes()
Exact content length; null = unknown (multipart-only territory).
-
getRepeatable
abstract Boolean getRepeatable()
True when open may be called more than once (retry-safe).
-
-
-
-