Package net.lingala.zip4j.io.inputstream
Class ZipInputStream
java.lang.Object
java.io.InputStream
net.lingala.zip4j.io.inputstream.ZipInputStream
- All Implemented Interfaces:
Closeable,AutoCloseable
-
Constructor Summary
ConstructorsConstructorDescriptionZipInputStream(InputStream inputStream) ZipInputStream(InputStream inputStream, char[] password) ZipInputStream(InputStream inputStream, char[] password, Charset charset) ZipInputStream(InputStream inputStream, char[] password, Zip4jConfig zip4jConfig) ZipInputStream(InputStream inputStream, Charset charset) ZipInputStream(InputStream inputStream, PasswordCallback passwordCallback) ZipInputStream(InputStream inputStream, PasswordCallback passwordCallback, Charset charset) ZipInputStream(InputStream inputStream, PasswordCallback passwordCallback, Zip4jConfig zip4jConfig) -
Method Summary
Modifier and TypeMethodDescriptionintvoidclose()getNextEntry(FileHeader fileHeader, boolean readUntilEndOfCurrentEntryIfOpen) intread()intread(byte[] b) intread(byte[] b, int off, int len) voidsetPassword(char[] password) Sets the password for the inputstream.Methods inherited from class java.io.InputStream
mark, markSupported, reset, skip
-
Constructor Details
-
ZipInputStream
-
ZipInputStream
-
ZipInputStream
-
ZipInputStream
-
ZipInputStream
-
ZipInputStream
-
ZipInputStream
-
ZipInputStream
public ZipInputStream(InputStream inputStream, PasswordCallback passwordCallback, Zip4jConfig zip4jConfig)
-
-
Method Details
-
getNextEntry
- Throws:
IOException
-
getNextEntry
public LocalFileHeader getNextEntry(FileHeader fileHeader, boolean readUntilEndOfCurrentEntryIfOpen) throws IOException - Throws:
IOException
-
read
- Specified by:
readin classInputStream- Throws:
IOException
-
read
- Overrides:
readin classInputStream- Throws:
IOException
-
read
- Overrides:
readin classInputStream- Throws:
IOException
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classInputStream- Throws:
IOException
-
available
- Overrides:
availablein classInputStream- Throws:
IOException
-
setPassword
public void setPassword(char[] password) Sets the password for the inputstream. This password will be used for any subsequent encrypted entries that will be read from this stream. If this method is called when an entry is being read, it has no effect on the read action of the current entry, and the password will take effect from any subsequent entry reads.- Parameters:
password- Password to be used for reading of entries from the zip input stream
-