|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.sevenzipjbinding.simple.impl.SimpleInArchiveItemImpl
public class SimpleInArchiveItemImpl
Standard implementation of ISimpleInArchiveItem
, simplified 7-Zip-JBinding interface.
Constructor Summary | |
---|---|
SimpleInArchiveItemImpl(IInArchive sevenZipInArchive,
int index)
Create instance of SimpleInArchiveItemImpl representing archive item with index indexindex
of archive sevenZipInArchive . |
|
SimpleInArchiveItemImpl(SimpleInArchiveImpl simpleInArchiveImpl,
int index)
Create instance of SimpleInArchiveItemImpl representing archive item with index indexindex
of archive simpleInArchiveImpl . |
Method Summary | |
---|---|
ExtractOperationResult |
extractSlow(ISequentialOutStream outStream)
Extract one archive item. |
ExtractOperationResult |
extractSlow(ISequentialOutStream outStream,
java.lang.String password)
Extract one archive item. |
java.lang.Integer |
getAttributes()
Return item attributes. Supported by all methods
|
java.lang.String |
getComment()
Return comments for the item. |
java.lang.Integer |
getCRC()
Return CRC checksum of the item content. |
java.util.Date |
getCreationTime()
Return creation date and time of the item. Supported by all methods
|
java.lang.String |
getGroup()
Return parent group of the item. |
java.lang.String |
getHostOS()
Return host OS of item. |
int |
getItemIndex()
Returns the archive item index |
java.util.Date |
getLastAccessTime()
Return last access date and time of the item. Supported by all methods
|
java.util.Date |
getLastWriteTime()
Return last write date and time of the item. Supported by all methods, but
|
java.lang.String |
getMethod()
Return string title of item compress method. |
java.lang.Long |
getPackedSize()
Size of the packed item in archive. |
java.lang.String |
getPath()
Full path, name and extension of the file inside the archive. |
java.lang.Integer |
getPosition()
TODO: the purpose of position isn't clear |
java.lang.Long |
getSize()
Original size of the item. |
java.lang.String |
getUser()
Return parent user of the item. |
java.lang.Boolean |
isCommented()
Return true if item was commented, otherwise false . |
boolean |
isEncrypted()
Flag either a item encrypted or not. |
boolean |
isFolder()
Returns flag either a item represents a folder or not. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SimpleInArchiveItemImpl(SimpleInArchiveImpl simpleInArchiveImpl, int index)
SimpleInArchiveItemImpl
representing archive item with index indexindex
of archive simpleInArchiveImpl
.
simpleInArchiveImpl
- opened archiveindex
- index of the item in archivepublic SimpleInArchiveItemImpl(IInArchive sevenZipInArchive, int index)
SimpleInArchiveItemImpl
representing archive item with index indexindex
of archive sevenZipInArchive
.
sevenZipInArchive
- opened archiveindex
- index of the item in archiveMethod Detail |
---|
public java.lang.String getPath() throws SevenZipException
'dir/file.ext'
. Please note,
that stream archive formats such as gzip does not support this property, since it is always a single file (or
stream) being compressed.
getPath
in interface ISimpleInArchiveItem
null
will be returned, if current archive type doesn't support this property.
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.Integer getAttributes() throws SevenZipException
Zip
7Z
Arj
Cab
Rar
getAttributes
in interface ISimpleInArchiveItem
null
will be returned, if current archive type doesn't support this property.
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.Integer getCRC() throws SevenZipException
getCRC
in interface ISimpleInArchiveItem
null
will be returned, if current archive type doesn't support this property.
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 getComment() throws SevenZipException
getComment
in interface ISimpleInArchiveItem
null
will be returned, if current archive type doesn't support this property.
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.util.Date getCreationTime() throws SevenZipException
7Z
Rar
getCreationTime
in interface ISimpleInArchiveItem
null
will be returned, if current archive type doesn't support this property.
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 getGroup() throws SevenZipException
getGroup
in interface ISimpleInArchiveItem
null
will be returned, if current archive type doesn't support this property.
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 getHostOS() throws SevenZipException
getHostOS
in interface ISimpleInArchiveItem
null
will be returned, if current archive type doesn't support this property.
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.util.Date getLastAccessTime() throws SevenZipException
7Z
Rar
getLastAccessTime
in interface ISimpleInArchiveItem
null
will be returned, if current archive type doesn't support this property.
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.util.Date getLastWriteTime() throws SevenZipException
BZ2
Chm
RPM
Split
Z
getLastWriteTime
in interface ISimpleInArchiveItem
null
will be returned, if current archive type doesn't support this property.
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 getMethod() throws SevenZipException
getMethod
in interface ISimpleInArchiveItem
null
will be returned, if current archive type doesn't support this property.
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.Long getPackedSize() throws SevenZipException
0
will be returned. It means either unknown or
the item shares compressed data with other items and so take no additional space in archive.
getPackedSize
in interface ISimpleInArchiveItem
null
will be returned, if current archive type doesn't support this property.
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.Integer getPosition() throws SevenZipException
getPosition
in interface ISimpleInArchiveItem
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.Long getSize() throws SevenZipException
-1
is returned, if no size known for this item.
getSize
in interface ISimpleInArchiveItem
-1
null
will be returned, if current archive type doesn't support this property.
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 getUser() throws SevenZipException
getUser
in interface ISimpleInArchiveItem
null
will be returned, if current archive type doesn't support this property.
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.Boolean isCommented() throws SevenZipException
true
if item was commented, otherwise false
.
isCommented
in interface ISimpleInArchiveItem
true
if item was commented, otherwise false
.null
will be returned, if current archive type doesn't support this property.
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 boolean isEncrypted() throws SevenZipException
isEncrypted
in interface ISimpleInArchiveItem
true
if item is encrypted, otherwise false
. false
is returned, if
archive format doesn't support this property.
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 boolean isFolder() throws SevenZipException
'dir/file'
without having an
item for 'dir'
at all.
isFolder
in interface ISimpleInArchiveItem
true
if item is a folder, otherwise false
. false
is returned, if
archive format doesn't support this property.
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(ISequentialOutStream outStream) throws SevenZipException
ISimpleInArchiveItem
sequentialOutStream
to output data.
extractSlow
in interface ISimpleInArchiveItem
outStream
- output stream 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 ExtractOperationResult extractSlow(ISequentialOutStream outStream, java.lang.String password) throws SevenZipException
ISimpleInArchiveItem
sequentialOutStream
to output data.
extractSlow
in interface ISimpleInArchiveItem
outStream
- output stream to usepassword
- 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 int getItemIndex()
getItemIndex
in interface ISimpleInArchiveItem
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |