Package net.lingala.zip4j.io
Class DeflaterOutputStream
- java.lang.Object
-
- java.io.OutputStream
-
- net.lingala.zip4j.io.BaseOutputStream
-
- net.lingala.zip4j.io.CipherOutputStream
-
- net.lingala.zip4j.io.DeflaterOutputStream
-
- All Implemented Interfaces:
Closeable,Flushable,AutoCloseable
- Direct Known Subclasses:
ZipOutputStream
public class DeflaterOutputStream extends CipherOutputStream
-
-
Field Summary
Fields Modifier and Type Field Description protected Deflaterdeflater-
Fields inherited from class net.lingala.zip4j.io.CipherOutputStream
crc, fileHeader, localFileHeader, outputStream, zipModel, zipParameters
-
-
Constructor Summary
Constructors Constructor Description DeflaterOutputStream(OutputStream outputStream, ZipModel zipModel)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcloseEntry()voidfinish()voidputNextEntry(File file, ZipParameters zipParameters)voidwrite(byte[] b)voidwrite(byte[] buf, int off, int len)voidwrite(int bval)-
Methods inherited from class net.lingala.zip4j.io.CipherOutputStream
close, decrementCompressedFileSize, getSourceFile, setSourceFile, updateTotalBytesRead
-
Methods inherited from class java.io.OutputStream
flush, nullOutputStream
-
-
-
-
Field Detail
-
deflater
protected Deflater deflater
-
-
Constructor Detail
-
DeflaterOutputStream
public DeflaterOutputStream(OutputStream outputStream, ZipModel zipModel)
-
-
Method Detail
-
putNextEntry
public void putNextEntry(File file, ZipParameters zipParameters) throws ZipException
- Overrides:
putNextEntryin classCipherOutputStream- Throws:
ZipException
-
write
public void write(byte[] b) throws IOException- Overrides:
writein classCipherOutputStream- Throws:
IOException
-
write
public void write(int bval) throws IOException- Overrides:
writein classCipherOutputStream- Throws:
IOException
-
write
public void write(byte[] buf, int off, int len) throws IOException- Overrides:
writein classCipherOutputStream- Throws:
IOException
-
closeEntry
public void closeEntry() throws IOException, ZipException- Overrides:
closeEntryin classCipherOutputStream- Throws:
IOExceptionZipException
-
finish
public void finish() throws IOException, ZipException- Overrides:
finishin classCipherOutputStream- Throws:
IOExceptionZipException
-
-