Class MemoryStorageProvider.MemoryStorage
java.lang.Object
org.apache.james.mime4j.storage.MemoryStorageProvider.MemoryStorage
- All Implemented Interfaces:
Storage
- Enclosing class:
MemoryStorageProvider
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddelete()Deletes the data held by thisStorageas soon as possible.Returns anInputStreamthat can be used to read the stored data.
-
Field Details
-
data
private byte[] data -
count
private final int count
-
-
Constructor Details
-
MemoryStorage
public MemoryStorage(byte[] data, int count)
-
-
Method Details
-
getInputStream
Description copied from interface:StorageReturns 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.- Specified by:
getInputStreamin interfaceStorage- Returns:
- an
InputStreamfor reading the stored data. - Throws:
IOException- if an I/O error occurs.
-
delete
-