Interface StorageProvider
- All Known Implementing Classes:
AbstractStorageProvider, CipherStorageProvider, MemoryStorageProvider, TempFileStorageProvider, ThresholdStorageProvider
public interface StorageProvider
Provides a strategy for storing the contents of an
InputStream
or retrieving the content written to an OutputStream.-
Method Summary
Modifier and TypeMethodDescriptionCreates aStorageOutputStreamwhere data to be stored can be written to.store(InputStream in) Stores the contents of the givenInputStream.
-
Method Details
-
store
Stores the contents of the givenInputStream.- Parameters:
in- stream containing the data to store.- Returns:
- a
Storageinstance that can be used to retrieve the stored content. - Throws:
IOException- if an I/O error occurs.
-
createStorageOutputStream
Creates aStorageOutputStreamwhere data to be stored can be written to. Subsequently the user can calltoStorage()on that object to get aStorageinstance that holds the data that has been written.- Returns:
- a
StorageOutputStreamwhere data can be written to. - Throws:
IOException- if an I/O error occurs.
-