Class ZipOutputStream
- java.lang.Object
-
- java.io.OutputStream
-
- net.lingala.zip4j.io.outputstream.ZipOutputStream
-
- All Implemented Interfaces:
Closeable,Flushable,AutoCloseable
public class ZipOutputStream extends OutputStream
-
-
Constructor Summary
Constructors Constructor Description ZipOutputStream(OutputStream outputStream)ZipOutputStream(OutputStream outputStream, char[] password)ZipOutputStream(OutputStream outputStream, char[] password, Charset charset)ZipOutputStream(OutputStream outputStream, char[] password, Zip4jConfig zip4jConfig, ZipModel zipModel)ZipOutputStream(OutputStream outputStream, Charset charset)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()FileHeadercloseEntry()voidputNextEntry(ZipParameters zipParameters)voidsetComment(String comment)voidwrite(byte[] b)voidwrite(byte[] b, int off, int len)voidwrite(int b)-
Methods inherited from class java.io.OutputStream
flush, nullOutputStream
-
-
-
-
Constructor Detail
-
ZipOutputStream
public ZipOutputStream(OutputStream outputStream) throws IOException
- Throws:
IOException
-
ZipOutputStream
public ZipOutputStream(OutputStream outputStream, Charset charset) throws IOException
- Throws:
IOException
-
ZipOutputStream
public ZipOutputStream(OutputStream outputStream, char[] password) throws IOException
- Throws:
IOException
-
ZipOutputStream
public ZipOutputStream(OutputStream outputStream, char[] password, Charset charset) throws IOException
- Throws:
IOException
-
ZipOutputStream
public ZipOutputStream(OutputStream outputStream, char[] password, Zip4jConfig zip4jConfig, ZipModel zipModel) throws IOException
- Throws:
IOException
-
-
Method Detail
-
putNextEntry
public void putNextEntry(ZipParameters zipParameters) throws IOException
- Throws:
IOException
-
write
public void write(int b) throws IOException- Specified by:
writein classOutputStream- 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 FileHeader closeEntry() throws IOException
- Throws:
IOException
-
close
public void close() throws IOException- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classOutputStream- Throws:
IOException
-
setComment
public void setComment(String comment) throws IOException
- Throws:
IOException
-
-