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:
java.io.Closeable,java.lang.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 private intcurrentSplitFileCounterprivate booleanisSplitZipArchiveprivate intlastSplitZipFileNumberprotected java.io.RandomAccessFilerandomAccessFileprivate byte[]singleByteArrayprotected java.io.FilezipFile
-
Constructor Summary
Constructors Constructor Description ZipStandardSplitFileInputStream(java.io.File zipFile, boolean isSplitZipArchive, int lastSplitZipFileNumber)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()protected java.io.FilegetNextSplitFile(int zipFileIndex)protected voidopenRandomAccessFileForIndex(int zipFileIndex)voidprepareExtractionForFileHeader(FileHeader fileHeader)intread()intread(byte[] b)intread(byte[] b, int off, int len)
-
-
-
Field Detail
-
randomAccessFile
protected java.io.RandomAccessFile randomAccessFile
-
zipFile
protected java.io.File zipFile
-
lastSplitZipFileNumber
private int lastSplitZipFileNumber
-
isSplitZipArchive
private boolean isSplitZipArchive
-
currentSplitFileCounter
private int currentSplitFileCounter
-
singleByteArray
private byte[] singleByteArray
-
-
Method Detail
-
read
public int read() throws java.io.IOException- Specified by:
readin classjava.io.InputStream- Throws:
java.io.IOException
-
read
public int read(byte[] b) throws java.io.IOException- Overrides:
readin classjava.io.InputStream- Throws:
java.io.IOException
-
read
public int read(byte[] b, int off, int len) throws java.io.IOException- Overrides:
readin classjava.io.InputStream- Throws:
java.io.IOException
-
prepareExtractionForFileHeader
public void prepareExtractionForFileHeader(FileHeader fileHeader) throws java.io.IOException
- Specified by:
prepareExtractionForFileHeaderin classSplitFileInputStream- Throws:
java.io.IOException
-
close
public void close() throws java.io.IOException- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfacejava.io.Closeable- Overrides:
closein classjava.io.InputStream- Throws:
java.io.IOException
-
openRandomAccessFileForIndex
protected void openRandomAccessFileForIndex(int zipFileIndex) throws java.io.IOException- Throws:
java.io.IOException
-
getNextSplitFile
protected java.io.File getNextSplitFile(int zipFileIndex) throws java.io.IOException- Throws:
java.io.IOException
-
-