Class AesCipherOutputStream
- java.lang.Object
-
- java.io.OutputStream
-
- net.lingala.zip4j.io.outputstream.CipherOutputStream<AESEncrypter>
-
- net.lingala.zip4j.io.outputstream.AesCipherOutputStream
-
- All Implemented Interfaces:
java.io.Closeable,java.io.Flushable,java.lang.AutoCloseable
class AesCipherOutputStream extends CipherOutputStream<AESEncrypter>
-
-
Field Summary
Fields Modifier and Type Field Description private byte[]pendingBufferprivate intpendingBufferLength
-
Constructor Summary
Constructors Constructor Description AesCipherOutputStream(ZipEntryOutputStream outputStream, ZipParameters zipParameters, char[] password, boolean useUtf8ForPassword)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcloseEntry()protected AESEncrypterinitializeEncrypter(java.io.OutputStream outputStream, ZipParameters zipParameters, char[] password, boolean useUtf8ForPassword)voidwrite(byte[] b)voidwrite(byte[] b, int off, int len)voidwrite(int b)private voidwriteAesEncryptionHeaderData(AESEncrypter encrypter)-
Methods inherited from class net.lingala.zip4j.io.outputstream.CipherOutputStream
close, getEncrypter, getNumberOfBytesWrittenForThisEntry, writeHeaders
-
-
-
-
Constructor Detail
-
AesCipherOutputStream
public AesCipherOutputStream(ZipEntryOutputStream outputStream, ZipParameters zipParameters, char[] password, boolean useUtf8ForPassword) throws java.io.IOException
- Throws:
java.io.IOException
-
-
Method Detail
-
initializeEncrypter
protected AESEncrypter initializeEncrypter(java.io.OutputStream outputStream, ZipParameters zipParameters, char[] password, boolean useUtf8ForPassword) throws java.io.IOException
- Specified by:
initializeEncrypterin classCipherOutputStream<AESEncrypter>- Throws:
java.io.IOException
-
writeAesEncryptionHeaderData
private void writeAesEncryptionHeaderData(AESEncrypter encrypter) throws java.io.IOException
- Throws:
java.io.IOException
-
write
public void write(int b) throws java.io.IOException- Overrides:
writein classCipherOutputStream<AESEncrypter>- Throws:
java.io.IOException
-
write
public void write(byte[] b) throws java.io.IOException- Overrides:
writein classCipherOutputStream<AESEncrypter>- Throws:
java.io.IOException
-
write
public void write(byte[] b, int off, int len) throws java.io.IOException- Overrides:
writein classCipherOutputStream<AESEncrypter>- Throws:
java.io.IOException
-
closeEntry
public void closeEntry() throws java.io.IOException- Overrides:
closeEntryin classCipherOutputStream<AESEncrypter>- Throws:
java.io.IOException
-
-