Interface OneShotContent
- All Superinterfaces:
AutoCloseable
Provider-independent one-shot streaming input.
A one-shot input is not repeatable and therefore must be staged before signing
recovery, canonical comparison, postcondition validation or publication that
needs another pass. The returned stream is owned by the caller. Implementations
must reject a second call to openStream().
-
Method Details
-
openStream
Opens the only sequential reader.- Returns:
- content stream
- Throws:
IOException- if the source cannot be openedIllegalStateException- if the source was already opened
-
length
OptionalLong length()Returns the known source length when available.- Returns:
- non-negative length or empty
-
close
Releases the source.- Specified by:
closein interfaceAutoCloseable- Throws:
IOException- if cleanup fails
-