public abstract class CipherOutputStream extends UpdateOutputStream
Constructor and Description |
---|
CipherOutputStream() |
Modifier and Type | Method and Description |
---|---|
abstract void |
close()
Closes this output stream and releases any system resources
associated with this stream.
|
finished, update, update, update
public abstract void close() throws java.io.IOException
This method invokes the doFinal
method of the encapsulated
cipher object, which causes any bytes buffered by the encapsulated
cipher to be processed. The result is written out by calling the
flush
method of this output stream.
This method resets the encapsulated cipher object to its initial state
and does not call close
method of the underlying output
stream.
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
close
in class java.io.OutputStream
java.io.IOException
- if an I/O error occurs.InvalidCipherTextException
- if the data written to this stream was invalid cipher text
(e.g. the cipher is an AEAD cipher and the cipher text tag check fails).