Package net.lingala.zip4j.io.inputstream
Class NumberedSplitRandomAccessFile
- java.lang.Object
-
- java.io.RandomAccessFile
-
- net.lingala.zip4j.io.inputstream.NumberedSplitRandomAccessFile
-
- All Implemented Interfaces:
Closeable,DataInput,DataOutput,AutoCloseable
public class NumberedSplitRandomAccessFile extends RandomAccessFile
A RandomAccessFile which reads files split with 7-zip format (.z001, .z002, etc) as a single file making it easier for calling methods to deal with opening appropriate split file to read
-
-
Constructor Summary
Constructors Constructor Description NumberedSplitRandomAccessFile(File file, String mode)NumberedSplitRandomAccessFile(File file, String mode, File[] allSortedSplitFiles)NumberedSplitRandomAccessFile(String name, String mode)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()longgetFilePointer()longlength()voidopenLastSplitFileForReading()intread()intread(byte[] b)intread(byte[] b, int off, int len)voidseek(long pos)voidseekInCurrentPart(long pos)voidwrite(byte[] b)voidwrite(byte[] b, int off, int len)voidwrite(int b)-
Methods inherited from class java.io.RandomAccessFile
getChannel, getFD, readBoolean, readByte, readChar, readDouble, readFloat, readFully, readFully, readInt, readLine, readLong, readShort, readUnsignedByte, readUnsignedShort, readUTF, setLength, skipBytes, writeBoolean, writeByte, writeBytes, writeChar, writeChars, writeDouble, writeFloat, writeInt, writeLong, writeShort, writeUTF
-
-
-
-
Constructor Detail
-
NumberedSplitRandomAccessFile
public NumberedSplitRandomAccessFile(String name, String mode) throws IOException
- Throws:
IOException
-
NumberedSplitRandomAccessFile
public NumberedSplitRandomAccessFile(File file, String mode) throws IOException
- Throws:
IOException
-
NumberedSplitRandomAccessFile
public NumberedSplitRandomAccessFile(File file, String mode, File[] allSortedSplitFiles) throws IOException
- Throws:
IOException
-
-
Method Detail
-
read
public int read() throws IOException- Overrides:
readin classRandomAccessFile- Throws:
IOException
-
read
public int read(byte[] b) throws IOException- Overrides:
readin classRandomAccessFile- Throws:
IOException
-
read
public int read(byte[] b, int off, int len) throws IOException- Overrides:
readin classRandomAccessFile- Throws:
IOException
-
write
public void write(int b) throws IOException- Specified by:
writein interfaceDataOutput- Overrides:
writein classRandomAccessFile- Throws:
IOException
-
write
public void write(byte[] b) throws IOException- Specified by:
writein interfaceDataOutput- Overrides:
writein classRandomAccessFile- Throws:
IOException
-
write
public void write(byte[] b, int off, int len) throws IOException- Specified by:
writein interfaceDataOutput- Overrides:
writein classRandomAccessFile- Throws:
IOException
-
seek
public void seek(long pos) throws IOException- Overrides:
seekin classRandomAccessFile- Throws:
IOException
-
getFilePointer
public long getFilePointer() throws IOException- Overrides:
getFilePointerin classRandomAccessFile- Throws:
IOException
-
length
public long length() throws IOException- Overrides:
lengthin classRandomAccessFile- Throws:
IOException
-
close
public void close() throws IOException- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classRandomAccessFile- Throws:
IOException
-
seekInCurrentPart
public void seekInCurrentPart(long pos) throws IOException- Throws:
IOException
-
openLastSplitFileForReading
public void openLastSplitFileForReading() throws IOException- Throws:
IOException
-
-