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 int
currentSplitFileCounter
private boolean
isSplitZipArchive
private int
lastSplitZipFileNumber
protected java.io.RandomAccessFile
randomAccessFile
private byte[]
singleByteArray
protected java.io.File
zipFile
-
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 void
close()
protected java.io.File
getNextSplitFile(int zipFileIndex)
protected void
openRandomAccessFileForIndex(int zipFileIndex)
void
prepareExtractionForFileHeader(FileHeader fileHeader)
int
read()
int
read(byte[] b)
int
read(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:
read
in classjava.io.InputStream
- Throws:
java.io.IOException
-
read
public int read(byte[] b) throws java.io.IOException
- Overrides:
read
in classjava.io.InputStream
- Throws:
java.io.IOException
-
read
public int read(byte[] b, int off, int len) throws java.io.IOException
- Overrides:
read
in classjava.io.InputStream
- Throws:
java.io.IOException
-
prepareExtractionForFileHeader
public void prepareExtractionForFileHeader(FileHeader fileHeader) throws java.io.IOException
- Specified by:
prepareExtractionForFileHeader
in classSplitFileInputStream
- Throws:
java.io.IOException
-
close
public void close() throws java.io.IOException
- Specified by:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in interfacejava.io.Closeable
- Overrides:
close
in 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
-
-