|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ISevenZipInArchive
One to one binding of original 7-Zip dll. Standard way to get implementation is to use SevenZip
.
The interface provides functionality to query archive and archive item parameters and to extract archive items.
The last call should be a call of the method close()
. After this call no more methods
should be called.
Method Summary | |
---|---|
void |
close()
Close archive. |
void |
extract(int[] indices,
boolean testMode,
IArchiveExtractCallback extractCallback)
Extract archive items with indices indices .Note: passing sorted indices array is more efficient. |
ExtractOperationResult |
extractSlow(int index,
ISequentialOutStream outStream)
Extract one item from archive. |
ExtractOperationResult |
extractSlow(int index,
ISequentialOutStream outStream,
java.lang.String password)
Extract one item from archive. |
ArchiveFormat |
getArchiveFormat()
Return archive format of the opened archive. |
java.lang.Object |
getArchiveProperty(PropID propID)
Get value of archive property propID . |
PropertyInfo |
getArchivePropertyInfo(PropID propID)
Get information about archive property propID .Use PropID.getPropIDByIndex(int) to get PropID enumeration element with specified index. |
int |
getNumberOfArchiveProperties()
Get count of properties of archive |
int |
getNumberOfItems()
Returns count of items in archive. |
int |
getNumberOfProperties()
Return count of properties of each archive item |
java.lang.Object |
getProperty(int index,
PropID propID)
Get value of property propID of the item with the index index . |
PropertyInfo |
getPropertyInfo(PropID propID)
Get information about archive item property propID |
ISimpleInArchive |
getSimpleInterface()
Return simple 7-Zip interface for the archive |
java.lang.String |
getStringArchiveProperty(PropID propID)
Return property value in human readable form. |
java.lang.String |
getStringProperty(int index,
PropID propID)
Return property content in human readable form. |
Method Detail |
---|
void close() throws SevenZipException
SevenZipException
- 7-Zip or 7-Zip-JBinding intern error. Check exception message for more information.int getNumberOfItems() throws SevenZipException
SevenZipException
- 7-Zip or 7-Zip-JBinding intern error. Check exception message for more information.java.lang.Object getProperty(int index, PropID propID) throws SevenZipException
propID
of the item with the index index
.
index
- index of item to get property valuepropID
- property to get value of
propID
of item with index index
SevenZipException
- 7-Zip or 7-Zip-JBinding intern error. Check exception message for more information.java.lang.String getStringProperty(int index, PropID propID) throws SevenZipException
PropID.ATTRIBUTES
: D
for a
directory.
index
- index of item in archive to get property ofpropID
- property to return
propID
of item with id index
in human readable form.
SevenZipException
- 7-Zip or 7-Zip-JBinding intern error. Check exception message for more information.void extract(int[] indices, boolean testMode, IArchiveExtractCallback extractCallback) throws SevenZipException
indices
.indices
array is more efficient. But it isn't suggested to manually sort
indices with something like Arrays.sort(int[])
. Sort indices only, if you can do it quicker, that generic
sort algorithms: O(n*log(n))
.
indices
- (optional) array of indices of archive items to extract.null
- all archive items.testMode
- true
- test archive items onlyfalse
- extract archive itemsextractCallback
- extraction callback object. Optional implementation of ICryptoGetTextPassword
.
SevenZipException
- 7-Zip or 7-Zip-JBinding intern error. Check exception message for more information.ExtractOperationResult extractSlow(int index, ISequentialOutStream outStream) throws SevenZipException
index
- index of the item to extractoutStream
- sequential output stream to get content of the item
SevenZipException
- 7-Zip or 7-Zip-JBinding intern error. Check exception message for more information.ExtractOperationResult extractSlow(int index, ISequentialOutStream outStream, java.lang.String password) throws SevenZipException
index
- index of the item to extractoutStream
- sequential output stream to get content of the itempassword
- password to use
SevenZipException
- 7-Zip or 7-Zip-JBinding intern error. Check exception message for more information.java.lang.Object getArchiveProperty(PropID propID) throws SevenZipException
propID
.
propID
- property to get value of
propID
SevenZipException
- 7-Zip or 7-Zip-JBinding intern error. Check exception message for more information.java.lang.String getStringArchiveProperty(PropID propID) throws SevenZipException
propID
- property to return
propID
of archive in human readable form.
SevenZipException
- 7-Zip or 7-Zip-JBinding intern error. Check exception message for more information.int getNumberOfProperties() throws SevenZipException
SevenZipException
- 7-Zip or 7-Zip-JBinding intern error. Check exception message for more information.PropertyInfo getPropertyInfo(PropID propID) throws SevenZipException
propID
propID
- item property
SevenZipException
- 7-Zip or 7-Zip-JBinding intern error. Check exception message for more information.int getNumberOfArchiveProperties() throws SevenZipException
SevenZipException
- 7-Zip or 7-Zip-JBinding intern error. Check exception message for more information.PropertyInfo getArchivePropertyInfo(PropID propID) throws SevenZipException
propID
.PropID.getPropIDByIndex(int)
to get PropID
enumeration element with specified index.
propID
- archive property
SevenZipException
- 7-Zip or 7-Zip-JBinding intern error. Check exception message for more information.ISimpleInArchive getSimpleInterface()
ArchiveFormat getArchiveFormat()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |