Package org.apache.james.mime4j.storage
Interface Storage
-
- All Known Implementing Classes:
MultiReferenceStorage
public interface StorageCan be used to read data that has been stored by aStorageProvider.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voiddelete()Deletes the data held by thisStorageas soon as possible.InputStreamgetInputStream()Returns anInputStreamthat can be used to read the stored data.
-
-
-
Method Detail
-
getInputStream
InputStream getInputStream() throws IOException
Returns anInputStreamthat can be used to read the stored data. The input stream should be closed by the caller when it is no longer needed.Note: The stream should NOT be wrapped in a
BufferedInputStreamby the caller. If the implementingStoragecreates a stream which would benefit from being buffered it is theStorage's responsibility to wrap it.- Returns:
- an
InputStreamfor reading the stored data. - Throws:
IOException- if an I/O error occurs.IllegalStateException- if thisStorageinstance has been deleted.
-
delete
void delete()
Deletes the data held by thisStorageas soon as possible. Deleting an already deletedStoragehas no effect.
-
-