Package org.ossreviewtoolkit.model.utils
Class FileProvenanceFileStorage
-
- All Implemented Interfaces:
-
org.ossreviewtoolkit.model.utils.ProvenanceFileStorage
public final class FileProvenanceFileStorage implements ProvenanceFileStorage
A FileStorage-based implementation of ProvenanceFileStorage that stores files associated by KnownProvenance in files.
-
-
Constructor Summary
Constructors Constructor Description FileProvenanceFileStorage(FileStorage storage, String filename)
-
Method Summary
Modifier and Type Method Description BooleanhasData(KnownProvenance provenance)Return whether any data is associated by provenance. UnitputData(KnownProvenance provenance, InputStream data, Long size)Associate provenance with the given data of the provided size. InputStreamgetData(KnownProvenance provenance)Return the data associated by provenance, or null if there is no such data. -
-
Constructor Detail
-
FileProvenanceFileStorage
FileProvenanceFileStorage(FileStorage storage, String filename)
-
-
Method Detail
-
hasData
Boolean hasData(KnownProvenance provenance)
Return whether any data is associated by provenance.
-
putData
Unit putData(KnownProvenance provenance, InputStream data, Long size)
Associate provenance with the given data of the provided size. Replaces any existing association by provenance. The function implementation is responsible for closing the stream.
-
getData
InputStream getData(KnownProvenance provenance)
Return the data associated by provenance, or null if there is no such data. Note that it is the responsibility of the caller to close the stream.
-
-
-
-