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[]
pendingBuffer
private int
pendingBufferLength
-
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 void
closeEntry()
protected AESEncrypter
initializeEncrypter(java.io.OutputStream outputStream, ZipParameters zipParameters, char[] password, boolean useUtf8ForPassword)
void
write(byte[] b)
void
write(byte[] b, int off, int len)
void
write(int b)
private void
writeAesEncryptionHeaderData(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:
initializeEncrypter
in 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:
write
in classCipherOutputStream<AESEncrypter>
- Throws:
java.io.IOException
-
write
public void write(byte[] b) throws java.io.IOException
- Overrides:
write
in classCipherOutputStream<AESEncrypter>
- Throws:
java.io.IOException
-
write
public void write(byte[] b, int off, int len) throws java.io.IOException
- Overrides:
write
in classCipherOutputStream<AESEncrypter>
- Throws:
java.io.IOException
-
closeEntry
public void closeEntry() throws java.io.IOException
- Overrides:
closeEntry
in classCipherOutputStream<AESEncrypter>
- Throws:
java.io.IOException
-
-