Package net.lingala.zip4j.io
Class CipherOutputStream
- java.lang.Object
-
- java.io.OutputStream
-
- net.lingala.zip4j.io.BaseOutputStream
-
- net.lingala.zip4j.io.CipherOutputStream
-
- All Implemented Interfaces:
Closeable,Flushable,AutoCloseable
- Direct Known Subclasses:
DeflaterOutputStream
public class CipherOutputStream extends BaseOutputStream
-
-
Field Summary
Fields Modifier and Type Field Description protected CRC32crcprotected FileHeaderfileHeaderprotected LocalFileHeaderlocalFileHeaderprotected OutputStreamoutputStreamprotected ZipModelzipModelprotected ZipParameterszipParameters
-
Constructor Summary
Constructors Constructor Description CipherOutputStream(OutputStream outputStream, ZipModel zipModel)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()voidcloseEntry()voiddecrementCompressedFileSize(int value)voidfinish()FilegetSourceFile()voidputNextEntry(File file, ZipParameters zipParameters)voidsetSourceFile(File sourceFile)protected voidupdateTotalBytesRead(int toUpdate)voidwrite(byte[] b)voidwrite(byte[] b, int off, int len)voidwrite(int bval)-
Methods inherited from class java.io.OutputStream
flush, nullOutputStream
-
-
-
-
Field Detail
-
outputStream
protected OutputStream outputStream
-
fileHeader
protected FileHeader fileHeader
-
localFileHeader
protected LocalFileHeader localFileHeader
-
zipParameters
protected ZipParameters zipParameters
-
zipModel
protected ZipModel zipModel
-
crc
protected CRC32 crc
-
-
Constructor Detail
-
CipherOutputStream
public CipherOutputStream(OutputStream outputStream, ZipModel zipModel)
-
-
Method Detail
-
putNextEntry
public void putNextEntry(File file, ZipParameters zipParameters) throws ZipException
- Throws:
ZipException
-
write
public void write(int bval) throws IOException- Overrides:
writein classBaseOutputStream- Throws:
IOException
-
write
public void write(byte[] b) throws IOException- Overrides:
writein classOutputStream- Throws:
IOException
-
write
public void write(byte[] b, int off, int len) throws IOException- Overrides:
writein classOutputStream- Throws:
IOException
-
closeEntry
public void closeEntry() throws IOException, ZipException- Throws:
IOExceptionZipException
-
finish
public void finish() throws IOException, ZipException- Throws:
IOExceptionZipException
-
close
public void close() throws IOException- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classOutputStream- Throws:
IOException
-
decrementCompressedFileSize
public void decrementCompressedFileSize(int value)
-
updateTotalBytesRead
protected void updateTotalBytesRead(int toUpdate)
-
setSourceFile
public void setSourceFile(File sourceFile)
-
getSourceFile
public File getSourceFile()
-
-