Package net.lingala.zip4j.io.inputstream
Class ZipStandardSplitFileInputStream
- java.lang.Object
-
- java.io.InputStream
-
- net.lingala.zip4j.io.inputstream.SplitFileInputStream
-
- net.lingala.zip4j.io.inputstream.ZipStandardSplitFileInputStream
-
- All Implemented Interfaces:
Closeable,AutoCloseable
public class ZipStandardSplitFileInputStream extends SplitFileInputStream
A split input stream for zip file split as per zip specification. They end with .z01, .z02... .zip
-
-
Field Summary
Fields Modifier and Type Field Description protected RandomAccessFilerandomAccessFileprotected FilezipFile
-
Constructor Summary
Constructors Constructor Description ZipStandardSplitFileInputStream(File zipFile, boolean isSplitZipArchive, int lastSplitZipFileNumber)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()protected FilegetNextSplitFile(int zipFileIndex)protected voidopenRandomAccessFileForIndex(int zipFileIndex)voidprepareExtractionForFileHeader(FileHeader fileHeader)intread()intread(byte[] b)intread(byte[] b, int off, int len)-
Methods inherited from class java.io.InputStream
available, mark, markSupported, nullInputStream, readAllBytes, readNBytes, readNBytes, reset, skip, transferTo
-
-
-
-
Field Detail
-
randomAccessFile
protected RandomAccessFile randomAccessFile
-
zipFile
protected File zipFile
-
-
Constructor Detail
-
ZipStandardSplitFileInputStream
public ZipStandardSplitFileInputStream(File zipFile, boolean isSplitZipArchive, int lastSplitZipFileNumber) throws FileNotFoundException
- Throws:
FileNotFoundException
-
-
Method Detail
-
read
public int read() throws IOException- Specified by:
readin classInputStream- Throws:
IOException
-
read
public int read(byte[] b) throws IOException- Overrides:
readin classInputStream- Throws:
IOException
-
read
public int read(byte[] b, int off, int len) throws IOException- Overrides:
readin classInputStream- Throws:
IOException
-
prepareExtractionForFileHeader
public void prepareExtractionForFileHeader(FileHeader fileHeader) throws IOException
- Specified by:
prepareExtractionForFileHeaderin classSplitFileInputStream- Throws:
IOException
-
close
public void close() throws IOException- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classInputStream- Throws:
IOException
-
openRandomAccessFileForIndex
protected void openRandomAccessFileForIndex(int zipFileIndex) throws IOException- Throws:
IOException
-
getNextSplitFile
protected File getNextSplitFile(int zipFileIndex) throws IOException
- Throws:
IOException
-
-