Interface BackupSource
- All Superinterfaces:
AutoCloseable
Repeatable file-backed backup input with an explicit owner.
Metadata is a commitment, not proof of authenticity. Verifiers must count and
hash actual input even when an implementation advertises trusted-looking values.
Callers close each stream and finally the source. A source must not be consumed
concurrently with its close operation.
-
Method Summary
Modifier and TypeMethodDescriptionbackupId()Returns the identifier committed by the backup manifest.voidclose()Releases owned input and storage.longReturns the complete archive length.Opens an independent stream at offset zero.sha256()Returns the commitment to the complete archive bytes.
-
Method Details
-
backupId
PkiId backupId()Returns the identifier committed by the backup manifest.- Returns:
- stable backup identifier
-
contentLength
long contentLength()Returns the complete archive length.- Returns:
- nonnegative byte count
-
sha256
String sha256()Returns the commitment to the complete archive bytes.- Returns:
- lowercase hexadecimal SHA-256
-
openStream
Opens an independent stream at offset zero.- Returns:
- caller-owned input stream
- Throws:
IOException- if opening fails or the source is closed
-
close
Releases owned input and storage. File-backed sources close their open streams and delete their own file. Successful repeated close is harmless; failed deletion is reported and can be retried.- Specified by:
closein interfaceAutoCloseable- Throws:
IOException- if resource release or deletion fails
-