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 TypeMethodDescriptionvoid
close()
void
protected T
long
protected abstract T
initializeEncrypter
(OutputStream outputStream, ZipParameters zipParameters, char[] password, boolean useUtf8ForPassword) void
write
(byte[] b) void
write
(byte[] b, int off, int len) void
write
(int b) void
writeHeaders
(byte[] b) Methods inherited from class java.io.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:
write
in classOutputStream
- Throws:
IOException
-
write
- Overrides:
write
in classOutputStream
- Throws:
IOException
-
write
- Overrides:
write
in classOutputStream
- Throws:
IOException
-
writeHeaders
- Throws:
IOException
-
closeEntry
- Throws:
IOException
-
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Overrides:
close
in 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
-