|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.sevenzipjbinding.impl.InArchiveImpl
public final class InArchiveImpl
Implementation of IInArchive
.
Constructor Summary | |
---|---|
InArchiveImpl()
|
Method Summary | |
---|---|
void |
close()
Close archive. |
void |
extract(int[] indices,
boolean testMode,
IArchiveExtractCallback extractCallback)
Extract archive items with indices indices . |
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(int index)
Get information about archive property with index index . |
IOutUpdateArchive<IOutItemAllFormats> |
getConnectedOutArchive()
Get an instance of IOutUpdateArchive connected to the current archive. |
IOutUpdateArchive7z |
getConnectedOutArchive7z()
Get an instance of IOutUpdateArchive7z connected to the current archive. |
IOutUpdateArchiveBZip2 |
getConnectedOutArchiveBZip2()
Get an instance of IOutUpdateArchiveBZip2 connected to the current archive. |
IOutUpdateArchiveGZip |
getConnectedOutArchiveGZip()
Get an instance of IOutUpdateArchiveGZip connected to the current archive. |
IOutUpdateArchiveTar |
getConnectedOutArchiveTar()
Get an instance of IOutUpdateArchiveTar connected to the current archive. |
IOutUpdateArchiveZip |
getConnectedOutArchiveZip()
Get an instance of IOutUpdateArchiveZip connected to the current archive. |
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 .NOTE: Some properties my only be available after the extraction operation completes. Example: PACKED_SIZE of the LZMA archives. |
PropertyInfo |
getPropertyInfo(int index)
Get information about archive item property with index index . |
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. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public InArchiveImpl()
Method Detail |
---|
public 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))
.
extract
in interface IInArchive
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 error occur. Use SevenZipException.printStackTraceExtended()
to get
stack traces of this SevenZipException and of the all thrown 'cause by' exceptions.public ExtractOperationResult extractSlow(int index, ISequentialOutStream outStream) throws SevenZipException
extractSlow
in interface IInArchive
index
- index of the item to extract. 0 - first archive item.outStream
- sequential output stream to get content of the item
SevenZipException
- 7-Zip or 7-Zip-JBinding error occur. Use SevenZipException.printStackTraceExtended()
to get
stack traces of this SevenZipException and of the all thrown 'cause by' exceptions.public ExtractOperationResult extractSlow(int index, ISequentialOutStream outStream, java.lang.String password) throws SevenZipException
extractSlow
in interface IInArchive
index
- index of the item to extract. 0 - first archive item.outStream
- sequential output stream to get content of the itempassword
- password to use
SevenZipException
- 7-Zip or 7-Zip-JBinding error occur. Use SevenZipException.printStackTraceExtended()
to get
stack traces of this SevenZipException and of the all thrown 'cause by' exceptions.public java.lang.Object getArchiveProperty(PropID propID) throws SevenZipException
propID
.
getArchiveProperty
in interface IInArchive
propID
- property to get value of
propID
SevenZipException
- 7-Zip or 7-Zip-JBinding error occur. Use SevenZipException.printStackTraceExtended()
to get
stack traces of this SevenZipException and of the all thrown 'cause by' exceptions.public java.lang.String getStringArchiveProperty(PropID propID) throws SevenZipException
getStringArchiveProperty
in interface IInArchive
propID
- property to return
propID
of archive in human readable form.
SevenZipException
- 7-Zip or 7-Zip-JBinding error occur. Use SevenZipException.printStackTraceExtended()
to get
stack traces of this SevenZipException and of the all thrown 'cause by' exceptions.public PropertyInfo getArchivePropertyInfo(int index) throws SevenZipException
index
.
getArchivePropertyInfo
in interface IInArchive
index
- property index
SevenZipException
- 7-Zip or 7-Zip-JBinding error occur. Use SevenZipException.printStackTraceExtended()
to get
stack traces of this SevenZipException and of the all thrown 'cause by' exceptions.IInArchive.getNumberOfArchiveProperties()
public int getNumberOfArchiveProperties() throws SevenZipException
getNumberOfArchiveProperties
in interface IInArchive
SevenZipException
- 7-Zip or 7-Zip-JBinding error occur. Use SevenZipException.printStackTraceExtended()
to get
stack traces of this SevenZipException and of the all thrown 'cause by' exceptions.public int getNumberOfProperties() throws SevenZipException
getNumberOfProperties
in interface IInArchive
SevenZipException
- 7-Zip or 7-Zip-JBinding error occur. Use SevenZipException.printStackTraceExtended()
to get
stack traces of this SevenZipException and of the all thrown 'cause by' exceptions.public PropertyInfo getPropertyInfo(int index) throws SevenZipException
index
.
getPropertyInfo
in interface IInArchive
index
- property index
SevenZipException
- 7-Zip or 7-Zip-JBinding error occur. Use SevenZipException.printStackTraceExtended()
to get
stack traces of this SevenZipException and of the all thrown 'cause by' exceptions.IInArchive.getNumberOfProperties()
public void close() throws SevenZipException
close
in interface java.io.Closeable
close
in interface IInArchive
SevenZipException
- 7-Zip or 7-Zip-JBinding error occur. Use SevenZipException.printStackTraceExtended()
to get
stack traces of this SevenZipException and of the all thrown 'cause by' exceptions.public int getNumberOfItems() throws SevenZipException
getNumberOfItems
in interface IInArchive
SevenZipException
- 7-Zip or 7-Zip-JBinding error occur. Use SevenZipException.printStackTraceExtended()
to get
stack traces of this SevenZipException and of the all thrown 'cause by' exceptions.public java.lang.Object getProperty(int index, PropID propID) throws SevenZipException
propID
of the item with the index index
.
getProperty
in interface IInArchive
index
- index of item to get property value. 0 - first archive item.propID
- property to get value of
propID
of item with index index
SevenZipException
- 7-Zip or 7-Zip-JBinding error occur. Use SevenZipException.printStackTraceExtended()
to get
stack traces of this SevenZipException and of the all thrown 'cause by' exceptions.public java.lang.String getStringProperty(int index, PropID propID) throws SevenZipException
PropID.ATTRIBUTES
: D
for a
directory.
getStringProperty
in interface IInArchive
index
- index of item in archive to get property of. 0 - first archive item.propID
- property to return
propID
of item with id index
in human readable form.
SevenZipException
- 7-Zip or 7-Zip-JBinding error occur. Use SevenZipException.printStackTraceExtended()
to get
stack traces of this SevenZipException and of the all thrown 'cause by' exceptions.public ISimpleInArchive getSimpleInterface()
getSimpleInterface
in interface IInArchive
public ArchiveFormat getArchiveFormat()
getArchiveFormat
in interface IInArchive
public IOutUpdateArchive<IOutItemAllFormats> getConnectedOutArchive() throws SevenZipException
IOutUpdateArchive
connected to the current archive. This is a part of the archive
format non-specific API. The new instance allows modification of the currently opened archive. Multiple call of
this methods return the same instance. Closing the returned instance of IOutUpdateArchive
isn't
necessary, since it will be closed automatically. This happens when the parent instance of the IInArchive
get closed. Calls to the Closeable.close()
methods of such connected instances will be ignored.
getConnectedOutArchive
in interface IInArchive
IOutUpdateArchive
interface
SevenZipException
- 7-Zip or 7-Zip-JBinding error occur. Use SevenZipException.printStackTraceExtended()
to get
stack traces of this SevenZipException and of the all thrown 'cause by' exceptions.public IOutUpdateArchive7z getConnectedOutArchive7z() throws SevenZipException
IOutUpdateArchive7z
connected to the current archive. This is a part of the archive
format specific API. The new instance only allows modification of the currently opened 7z archive. Multiple call
of this methods return the same instance. Closing the returned instance of IOutUpdateArchive7z
isn't
necessary, since it will be closed automatically. This happens when the parent instance of the IInArchive
get closed. Calls to the Closeable.close()
methods of such connected instances will be ignored.
getConnectedOutArchive7z
in interface IInArchive
IOutUpdateArchive
interface
SevenZipException
- 7-Zip or 7-Zip-JBinding error occur. Use SevenZipException.printStackTraceExtended()
to get
stack traces of this SevenZipException and of the all thrown 'cause by' exceptions.public IOutUpdateArchiveZip getConnectedOutArchiveZip() throws SevenZipException
IOutUpdateArchiveZip
connected to the current archive. This is a part of the archive
format specific API. The new instance only allows modification of the currently opened Zip archive. Multiple call
of this methods return the same instance. Closing the returned instance of IOutUpdateArchiveZip
isn't
necessary, since it will be closed automatically. This happens when the parent instance of the IInArchive
get closed. Calls to the Closeable.close()
methods of such connected instances will be ignored.
getConnectedOutArchiveZip
in interface IInArchive
IOutUpdateArchive
interface
SevenZipException
- 7-Zip or 7-Zip-JBinding error occur. Use SevenZipException.printStackTraceExtended()
to get
stack traces of this SevenZipException and of the all thrown 'cause by' exceptions.public IOutUpdateArchiveTar getConnectedOutArchiveTar() throws SevenZipException
IOutUpdateArchiveTar
connected to the current archive. This is a part of the archive
format specific API. The new instance only allows modification of the currently opened Tar archive. Multiple call
of this methods return the same instance. Closing the returned instance of IOutUpdateArchiveTar
isn't
necessary, since it will be closed automatically. This happens when the parent instance of the IInArchive
get closed. Calls to the Closeable.close()
methods of such connected instances will be ignored.
getConnectedOutArchiveTar
in interface IInArchive
IOutUpdateArchive
interface
SevenZipException
- 7-Zip or 7-Zip-JBinding error occur. Use SevenZipException.printStackTraceExtended()
to get
stack traces of this SevenZipException and of the all thrown 'cause by' exceptions.public IOutUpdateArchiveGZip getConnectedOutArchiveGZip() throws SevenZipException
IOutUpdateArchiveGZip
connected to the current archive. This is a part of the archive
format specific API. The new instance only allows modification of the currently opened GZip archive. Multiple
call of this methods return the same instance. Closing the returned instance of IOutUpdateArchiveGZip
isn't necessary, since it will be closed automatically. This happens when the parent instance of the
IInArchive
get closed. Calls to the Closeable.close()
methods of such connected instances will
be ignored.
getConnectedOutArchiveGZip
in interface IInArchive
IOutUpdateArchive
interface
SevenZipException
- 7-Zip or 7-Zip-JBinding error occur. Use SevenZipException.printStackTraceExtended()
to get
stack traces of this SevenZipException and of the all thrown 'cause by' exceptions.public IOutUpdateArchiveBZip2 getConnectedOutArchiveBZip2() throws SevenZipException
IOutUpdateArchiveBZip2
connected to the current archive. This is a part of the archive
format specific API. The new instance only allows modification of the currently opened BZip2 archive. Multiple
call of this methods return the same instance. Closing the returned instance of IOutUpdateArchiveBZip2
isn't necessary, since it will be closed automatically. This happens when the parent instance of the
IInArchive
get closed. Calls to the Closeable.close()
methods of such connected instances will
be ignored.
getConnectedOutArchiveBZip2
in interface IInArchive
IOutUpdateArchive
interface
SevenZipException
- 7-Zip or 7-Zip-JBinding error occur. Use SevenZipException.printStackTraceExtended()
to get
stack traces of this SevenZipException and of the all thrown 'cause by' exceptions.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |