Class CipherOutputStream<T extends Encrypter>
java.lang.Object
java.io.OutputStream
net.lingala.zip4j.io.outputstream.CipherOutputStream<T>
- All Implemented Interfaces:
Closeable, Flushable, AutoCloseable
- Direct Known Subclasses:
AesCipherOutputStream, NoCipherOutputStream, ZipStandardCipherOutputStream
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionCipherOutputStream(ZipEntryOutputStream zipEntryOutputStream, ZipParameters zipParameters, char[] password, boolean useUtf8ForPassword) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()voidprotected Tlongprotected abstract TinitializeEncrypter(OutputStream outputStream, ZipParameters zipParameters, char[] password, boolean useUtf8ForPassword) voidwrite(byte[] b) voidwrite(byte[] b, int off, int len) voidwrite(int b) voidwriteHeaders(byte[] b) Methods inherited from class OutputStream
flush
-
Field Details
-
zipEntryOutputStream
-
encrypter
-
-
Constructor Details
-
CipherOutputStream
public CipherOutputStream(ZipEntryOutputStream zipEntryOutputStream, ZipParameters zipParameters, char[] password, boolean useUtf8ForPassword) throws IOException - Throws:
IOException
-
-
Method Details
-
write
- Specified by:
writein classOutputStream- Throws:
IOException
-
write
- Overrides:
writein classOutputStream- Throws:
IOException
-
write
- Overrides:
writein classOutputStream- Throws:
IOException
-
writeHeaders
- Throws:
IOException
-
closeEntry
- Throws:
IOException
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classOutputStream- Throws:
IOException
-
getNumberOfBytesWrittenForThisEntry
public long getNumberOfBytesWrittenForThisEntry() -
getEncrypter
-
initializeEncrypter
protected abstract T initializeEncrypter(OutputStream outputStream, ZipParameters zipParameters, char[] password, boolean useUtf8ForPassword) throws IOException - Throws:
IOException
-