Package org.ossreviewtoolkit.model.utils
Interface ProvenanceFileStorage
-
- All Implemented Interfaces:
public interface ProvenanceFileStorageA generic storage interface that associates a KnownProvenance with a stream of data.
-
-
Method Summary
Modifier and Type Method Description abstract BooleanhasData(KnownProvenance provenance)Return whether any data is associated by provenance. abstract UnitputData(KnownProvenance provenance, InputStream data, Long size)Associate provenance with the given data of the provided size. abstract InputStreamgetData(KnownProvenance provenance)Return the data associated by provenance, or null if there is no such data. -
-
Method Detail
-
hasData
abstract Boolean hasData(KnownProvenance provenance)
Return whether any data is associated by provenance.
-
putData
abstract 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
abstract 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.
-
-
-
-