Closeable
, Flushable
, AutoCloseable
public class DecryptionOutputStream extends OutputStream
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 | Description |
---|---|
DecryptionOutputStream(OutputStream aOutputStream,
Encrypter<byte[],byte[],EncryptionException> aEncrypter) |
Constructs the
DecryptionOutputStream by wrapping the given
OutputStream for the provided Encrypter to be applied on
the bytes to be written. |
public DecryptionOutputStream(OutputStream aOutputStream, Encrypter<byte[],byte[],EncryptionException> aEncrypter)
DecryptionOutputStream
by wrapping the given
OutputStream
for the provided Encrypter
to be applied on
the bytes to be written.aOutputStream
- The OutputStream
to be wrapped.aEncrypter
- The Encrypter
to be applied to the bytes to be
written.public void close() throws IOException
close
in interface AutoCloseable
close
in interface Closeable
close
in class OutputStream
IOException
public void flush() throws IOException
flush
in interface Flushable
flush
in class OutputStream
IOException
public void write(int value) throws IOException
write
in class OutputStream
IOException
public void write(byte[] b) throws IOException
write
in class OutputStream
IOException
public void write(byte[] b, int off, int len) throws IOException
write
in class OutputStream
IOException
Copyright © 2021. All rights reserved.