Package org.apache.james.mime4j.storage
Class CipherStorageProvider.CipherStorage
- java.lang.Object
-
- org.apache.james.mime4j.storage.CipherStorageProvider.CipherStorage
-
- All Implemented Interfaces:
Storage
- Enclosing class:
- CipherStorageProvider
private static final class CipherStorageProvider.CipherStorage extends java.lang.Object implements Storage
-
-
Constructor Summary
Constructors Constructor Description CipherStorage(Storage encrypted, java.lang.String algorithm, javax.crypto.spec.SecretKeySpec skeySpec)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddelete()Deletes the data held by thisStorageas soon as possible.java.io.InputStreamgetInputStream()Returns anInputStreamthat can be used to read the stored data.
-
-
-
Field Detail
-
encrypted
private Storage encrypted
-
algorithm
private final java.lang.String algorithm
-
skeySpec
private final javax.crypto.spec.SecretKeySpec skeySpec
-
-
Constructor Detail
-
CipherStorage
public CipherStorage(Storage encrypted, java.lang.String algorithm, javax.crypto.spec.SecretKeySpec skeySpec)
-
-
Method Detail
-
delete
public void delete()
Description copied from interface:StorageDeletes the data held by thisStorageas soon as possible. Deleting an already deletedStoragehas no effect.
-
getInputStream
public java.io.InputStream getInputStream() throws java.io.IOExceptionDescription 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:
java.io.IOException- if an I/O error occurs.
-
-