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 void
close()
FileHeader
closeEntry()
void
putNextEntry(ZipParameters zipParameters)
void
setComment(String comment)
void
write(byte[] b)
void
write(byte[] b, int off, int len)
void
write(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:
write
in classOutputStream
- Throws:
IOException
-
write
public void write(byte[] b) throws IOException
- Overrides:
write
in classOutputStream
- Throws:
IOException
-
write
public void write(byte[] b, int off, int len) throws IOException
- Overrides:
write
in classOutputStream
- Throws:
IOException
-
closeEntry
public FileHeader closeEntry() throws IOException
- Throws:
IOException
-
close
public void close() throws IOException
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Overrides:
close
in classOutputStream
- Throws:
IOException
-
setComment
public void setComment(String comment) throws IOException
- Throws:
IOException
-
-