Class SimpleInArchiveImpl
java.lang.Object
net.sf.sevenzipjbinding.simple.impl.SimpleInArchiveImpl
- All Implemented Interfaces:
ISimpleInArchive
Standard implementation of
ISimpleInArchive, simplified 7-Zip-JBinding interface.- Since:
- 4.65-1
- Author:
- Boris Brodski
-
Constructor Summary
ConstructorsConstructorDescriptionSimpleInArchiveImpl(IInArchive sevenZipInArchive) Constructing an instance ofSimpleInArchiveImplfrom a instance ofIInArchive. -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Close archive.getArchiveItem(int index) Return a simple representation of the archive item with indexindex.Return array of archive items withISimpleInArchive.getNumberOfItems()elements.intReturn count of items in archive.Tests, if 7-Zip In archive interface can be accessed safely.
-
Constructor Details
-
SimpleInArchiveImpl
Constructing an instance ofSimpleInArchiveImplfrom a instance ofIInArchive.- Parameters:
sevenZipInArchive- a base instance ofIInArchive
-
-
Method Details
-
close
Close archive. No more archive operations are possible.
Note: This method should be always called to free system resources.- Specified by:
closein interfaceISimpleInArchive- Throws:
SevenZipException- 7-Zip or 7-Zip-JBinding error occurs. UseSevenZipException.printStackTraceExtended()to get stack traces of this SevenZipException and of all thrown 'caused by' exceptions.
-
getArchiveItems
Return array of archive items withISimpleInArchive.getNumberOfItems()elements.- Specified by:
getArchiveItemsin interfaceISimpleInArchive- Returns:
- array of archive items
- Throws:
SevenZipException- 7-Zip or 7-Zip-JBinding error occurs. UseSevenZipException.printStackTraceExtended()to get stack traces of this SevenZipException and of all thrown 'caused by' exceptions.
-
getNumberOfItems
Return count of items in archive.- Specified by:
getNumberOfItemsin interfaceISimpleInArchive- Returns:
- count of items in archive.
- Throws:
SevenZipException- 7-Zip or 7-Zip-JBinding error occurs. UseSevenZipException.printStackTraceExtended()to get stack traces of this SevenZipException and of all thrown 'caused by' exceptions.
-
testAndGetSafeSevenZipInArchive
Tests, if 7-Zip In archive interface can be accessed safely.- Returns:
- 7-Zip In archive interface
- Throws:
SevenZipException- archive can't be accessed any more
-
getArchiveItem
Return a simple representation of the archive item with indexindex.- Specified by:
getArchiveItemin interfaceISimpleInArchive- Parameters:
index- index of the archive item to return- Returns:
- corresponding instance of
ISimpleInArchiveItem - Throws:
SevenZipException- 7-Zip or 7-Zip-JBinding error occurs. UseSevenZipException.printStackTraceExtended()to get stack traces of this SevenZipException and of all thrown 'caused by' exceptions.
-