Package com.privatechain.storage.fs
package com.privatechain.storage.fs
File-system storage backend — persists each block as an individual JSON file
in a configurable directory (FR-STOR-05).
FileSystemStorage writes block index
n to <dir>/block-<n>.json using
BlockSerializer. It requires no native libraries
and is therefore portable across all JDK 17+ platforms.
All file path inputs are sanitized before use; SpotBugs
PATH_TRAVERSAL_IN findings are suppressed with documented justification
where the sanitization cannot be expressed in a form the interprocedural analyzer
can verify statically.
Thread safety: writes are serialized via a ReentrantLock; reads use a
shared ReadLock (FR-STOR-06).
- Since:
- 1.0.0
-
ClassesClassDescriptionFile system backed
BlockchainStorageimplementation that stores each block as a separate JSON file.