public class EncryptedEntryOutputStream extends FilterOutputStream implements AutoCloseable
DecryptedEntryInputStream.| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes the current entry in the underlying ZipOutputStream but DOES NOT close the stream.
|
static EncryptedEntryOutputStream |
createEncryptionOutputStream(ZipOutputStream zipOutputStream,
ContentAlgorithmParam algorithmParam,
ContentEncryptionKey contentEncryptionKey)
Creates a new entry with encryption.
|
boolean |
isClosed() |
flush, write, write, writepublic static EncryptedEntryOutputStream createEncryptionOutputStream(ZipOutputStream zipOutputStream, ContentAlgorithmParam algorithmParam, ContentEncryptionKey contentEncryptionKey) throws InvalidAlgorithmParameterException, NoSuchPaddingException, NoSuchAlgorithmException, NoSuchProviderException, InvalidKeyException, IOException
zipOutputStream - where the new entry will be writtencontentEncryptionKey - the content key to usealgorithmParam - parametrization for what encryption algorithm to use. should be set to defaultInvalidAlgorithmParameterException - throws on errorNoSuchPaddingException - throws on errorNoSuchAlgorithmException - throws on errorNoSuchProviderException - throws on errorInvalidKeyException - throws on errorIOException - throws on errorpublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in class FilterOutputStreamIOException - throws on failure to close the encapsulated cipher streampublic boolean isClosed()
Licensed under the Apache License 2.0 - Copyright © {inceptionYear} – 2024 the original author or authors.