Package org.apache.james.mime4j.storage
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 aStorageOutputStream
where 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
Storage
instance that can be used to retrieve the stored content. - Throws:
IOException
- if an I/O error occurs.
-
createStorageOutputStream
Creates aStorageOutputStream
where data to be stored can be written to. Subsequently the user can calltoStorage()
on that object to get aStorage
instance that holds the data that has been written.- Returns:
- a
StorageOutputStream
where data can be written to. - Throws:
IOException
- if an I/O error occurs.
-