java.lang.Object
java.io.OutputStream
org.refcodes.security.DecryptionOutputStream
- All Implemented Interfaces:
Closeable,Flushable,AutoCloseable
public class DecryptionOutputStream extends OutputStream
A
DecryptionOutputStream wraps an OutputStream and produces
output bytes by applying a Encrypter on each byte to be written
before delegating the processed vale to the given OutputStream. The
output of the DecryptionOutputStream can be converted back by the
according EncryptionInputStream.-
Constructor Summary
Constructors Constructor Description DecryptionOutputStream(OutputStream aOutputStream, Encrypter<byte[],byte[],EncryptionException> aEncrypter)Constructs theDecryptionOutputStreamby wrapping the givenOutputStreamfor the providedEncrypterto be applied on the bytes to be written. -
Method Summary
Methods inherited from class java.io.OutputStream
nullOutputStream
-
Constructor Details
-
DecryptionOutputStream
public DecryptionOutputStream(OutputStream aOutputStream, Encrypter<byte[],byte[],EncryptionException> aEncrypter)Constructs theDecryptionOutputStreamby wrapping the givenOutputStreamfor the providedEncrypterto be applied on the bytes to be written.- Parameters:
aOutputStream- TheOutputStreamto be wrapped.aEncrypter- TheEncrypterto be applied to the bytes to be written.
-
-
Method Details
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classOutputStream- Throws:
IOException
-
equals
-
flush
- Specified by:
flushin interfaceFlushable- Overrides:
flushin classOutputStream- Throws:
IOException
-
hashCode
public int hashCode() -
toString
-
write
- Specified by:
writein classOutputStream- Throws:
IOException
-
write
- Overrides:
writein classOutputStream- Throws:
IOException
-
write
- Overrides:
writein classOutputStream- Throws:
IOException
-