Class S3FileStorage
-
- All Implemented Interfaces:
-
org.ossreviewtoolkit.utils.ort.storage.FileStorage
public final class S3FileStorage implements FileStorage
A FileStorage that stores files in an AWS S3 bucket bucketName. The read and exists operations are blocking, but the write operation is asynchronous unless a customEndpoint is provided. Contents are compressed before store if the compression flag is set to true.
-
-
Method Summary
Modifier and Type Method Description Booleanexists(String path)Return whether the given path exists or not. InputStreamread(String path)Read the file at path. Unitwrite(String path, InputStream inputStream)Write the data from inputStream to the file at path. Booleandelete(String path)Delete the file at the given path and return whether the operation was successful. -
-
Method Detail
-
read
InputStream read(String path)
Read the file at path. It is the caller's responsibility to close the returned InputStream after consuming it.
-
write
Unit write(String path, InputStream inputStream)
Write the data from inputStream to the file at path. If the file already exists it is overwritten. The provided inputStream is closed after writing it to the file.
-
-
-
-