Package net.sf.sevenzipjbinding.impl
Class OutItem
java.lang.Object
net.sf.sevenzipjbinding.impl.OutItem
- All Implemented Interfaces:
IOutItem7z,IOutItemAllFormats,IOutItemBase,IOutItemBZip2,IOutItemGZip,IOutItemTar,IOutItemXz,IOutItemZip
Implementation of the all
The purpose of the archive format specific interfaces
IOutItemXxx interfaces. Contains information about a single archive item
required for a create or update operation. Instances should be created by OutItemFactory. See
IOutCreateCallback.getItemInformation(int, OutItemFactory) for details.The purpose of the archive format specific interfaces
IOutItemXxx is to hide methods unrelated to the
corresponding archive format. For example, GZip format doesn't support the attributes property and so
the IOutItemGZip interface doesn't contain corresponding getters and setter. The Zip archive format on the
other hand does support the attributes property defining the methods:
- Since:
- 9.20-2.00
- Author:
- Boris Brodski
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionReturn current archive formatGet propertyPropID.SIZE.intgetIndex()Return the index of the item being described in the new archive.IOutArchive<?>Return corresponding IOutArchive object.Get propertyPropID.ATTRIBUTES.Get propertyPropID.COMMENT.Get propertyPropID.CRC.Get propertyPropID.CREATION_TIME.Get propertyPropID.ENCRYPTED.Get propertyPropID.GROUP.Get propertyPropID.HARD_LINK.Get propertyPropID.IS_ANTI.Get propertyPropID.IS_FOLDER.Get propertyPropID.LAST_ACCESS_TIME.Get propertyPropID.LAST_MODIFICATION_TIME.Get propertyPropID.PATH.Get propertyPropID.POSIX_ATTRIB.Get propertyPropID.SYM_LINK.Get propertyPropID.USER.Get whether the archive item data (content) has changed.Get whether the archive item properties have changed.Get the index of the archive item in the archive being updated (old archive).voidsetDataSize(Long size) Set propertyPropID.SIZE.voidsetPropertyAttributes(Integer attributes) Set propertyPropID.ATTRIBUTES.voidsetPropertyComment(String comment) Set propertyPropID.COMMENT.voidsetPropertyCRC(Integer crc) Set propertyPropID.CRC.voidsetPropertyCreationTime(Date creationTime) Set propertyPropID.CREATION_TIME.voidsetPropertyEncrypted(Boolean encrypted) Set propertyPropID.ENCRYPTED.voidsetPropertyGroup(String group) Set propertyPropID.GROUP.voidsetPropertyHardLink(String propertyHardLink) Set propertyPropID.HARD_LINK.voidsetPropertyIsAnti(Boolean isAnti) Set propertyPropID.IS_ANTI.voidsetPropertyIsDir(Boolean dir) Set propertyPropID.IS_FOLDER.voidsetPropertyLastAccessTime(Date lastAccessTime) Set propertyPropID.LAST_ACCESS_TIME.voidsetPropertyLastModificationTime(Date modificationTime) Set propertyPropID.LAST_MODIFICATION_TIME.voidsetPropertyPath(String path) Set propertyPropID.PATH.voidsetPropertyPosixAttributes(Integer posixAttributes) Set propertyPropID.POSIX_ATTRIB.voidsetPropertySymLink(String propertySymLink) Set propertyPropID.SYM_LINK.voidsetPropertyUser(String user) Set propertyPropID.USER.voidsetUpdateIsNewData(Boolean updateIsNewData) Set whether the archive item data (content) has changed.voidsetUpdateIsNewProperties(Boolean updateIsNewProperties) Set whether the archive item properties have changed.voidsetUpdateOldArchiveItemIndex(Integer updateOldArchiveItemIndex) Set the index of the archive item in the archive being updated (old archive).
-
Method Details
-
getIndex
public int getIndex()Return the index of the item being described in the new archive.- Specified by:
getIndexin interfaceIOutItemBase- Returns:
- the index of the item in the archive (0-based)
-
getOutArchive
Description copied from interface:IOutItemBaseReturn corresponding IOutArchive object.- Specified by:
getOutArchivein interfaceIOutItemBase- Returns:
- IOutArchive
-
getArchiveFormat
Return current archive format- Specified by:
getArchiveFormatin interfaceIOutItemBase- Returns:
- archive format
-
getDataSize
Get propertyPropID.SIZE.- Specified by:
getDataSizein interfaceIOutItemBase- Returns:
- size.
- See Also:
-
setDataSize
Set propertyPropID.SIZE.- Specified by:
setDataSizein interfaceIOutItemBase- Parameters:
size- seePropID.SIZE- See Also:
-
getPropertyAttributes
Get propertyPropID.ATTRIBUTES.- Specified by:
getPropertyAttributesin interfaceIOutItem7z- Specified by:
getPropertyAttributesin interfaceIOutItemZip- Returns:
- attributes
- See Also:
-
setPropertyAttributes
Set propertyPropID.ATTRIBUTES.- Specified by:
setPropertyAttributesin interfaceIOutItem7z- Specified by:
setPropertyAttributesin interfaceIOutItemZip- Parameters:
attributes- seePropID.ATTRIBUTES- See Also:
-
getPropertyPosixAttributes
Get propertyPropID.POSIX_ATTRIB.- Specified by:
getPropertyPosixAttributesin interfaceIOutItemTar- Returns:
- posix attributes
- See Also:
-
setPropertyPosixAttributes
Set propertyPropID.POSIX_ATTRIB.- Specified by:
setPropertyPosixAttributesin interfaceIOutItemTar- Parameters:
posixAttributes- seePropID.POSIX_ATTRIB- See Also:
-
getPropertyPath
Get propertyPropID.PATH.- Specified by:
getPropertyPathin interfaceIOutItem7z- Specified by:
getPropertyPathin interfaceIOutItemGZip- Specified by:
getPropertyPathin interfaceIOutItemTar- Specified by:
getPropertyPathin interfaceIOutItemZip- Returns:
- path
- See Also:
-
setPropertyPath
Set propertyPropID.PATH.- Specified by:
setPropertyPathin interfaceIOutItem7z- Specified by:
setPropertyPathin interfaceIOutItemGZip- Specified by:
setPropertyPathin interfaceIOutItemTar- Specified by:
setPropertyPathin interfaceIOutItemZip- Parameters:
path- seePropID.PATH- See Also:
-
getPropertyIsDir
Get propertyPropID.IS_FOLDER.- Specified by:
getPropertyIsDirin interfaceIOutItem7z- Specified by:
getPropertyIsDirin interfaceIOutItemTar- Specified by:
getPropertyIsDirin interfaceIOutItemZip- Returns:
- dir
- See Also:
-
setPropertyIsDir
Set propertyPropID.IS_FOLDER.- Specified by:
setPropertyIsDirin interfaceIOutItem7z- Specified by:
setPropertyIsDirin interfaceIOutItemTar- Specified by:
setPropertyIsDirin interfaceIOutItemZip- Parameters:
dir- seePropID.IS_FOLDER- See Also:
-
getPropertyLastModificationTime
Get propertyPropID.LAST_MODIFICATION_TIME.- Specified by:
getPropertyLastModificationTimein interfaceIOutItem7z- Specified by:
getPropertyLastModificationTimein interfaceIOutItemGZip- Specified by:
getPropertyLastModificationTimein interfaceIOutItemTar- Specified by:
getPropertyLastModificationTimein interfaceIOutItemZip- Returns:
- last modification time
- See Also:
-
setPropertyLastModificationTime
Set propertyPropID.LAST_MODIFICATION_TIME.- Specified by:
setPropertyLastModificationTimein interfaceIOutItem7z- Specified by:
setPropertyLastModificationTimein interfaceIOutItemGZip- Specified by:
setPropertyLastModificationTimein interfaceIOutItemTar- Specified by:
setPropertyLastModificationTimein interfaceIOutItemZip- Parameters:
modificationTime- seePropID.LAST_MODIFICATION_TIME- See Also:
-
getPropertyLastAccessTime
Get propertyPropID.LAST_ACCESS_TIME.- Specified by:
getPropertyLastAccessTimein interfaceIOutItemZip- Returns:
- last access time
- See Also:
-
setPropertyLastAccessTime
Set propertyPropID.LAST_ACCESS_TIME.- Specified by:
setPropertyLastAccessTimein interfaceIOutItemZip- Parameters:
lastAccessTime- seePropID.LAST_ACCESS_TIME- See Also:
-
getPropertyCreationTime
Get propertyPropID.CREATION_TIME.- Specified by:
getPropertyCreationTimein interfaceIOutItemZip- Returns:
- creation time
- See Also:
-
setPropertyCreationTime
Set propertyPropID.CREATION_TIME.- Specified by:
setPropertyCreationTimein interfaceIOutItemZip- Parameters:
creationTime- seePropID.CREATION_TIME- See Also:
-
getPropertyUser
Get propertyPropID.USER.- Specified by:
getPropertyUserin interfaceIOutItemTar- Returns:
- user
- See Also:
-
setPropertyUser
Set propertyPropID.USER.- Specified by:
setPropertyUserin interfaceIOutItemTar- Parameters:
user- seePropID.USER- See Also:
-
getPropertyGroup
Get propertyPropID.GROUP.- Specified by:
getPropertyGroupin interfaceIOutItemTar- Returns:
- group
- See Also:
-
setPropertyGroup
Set propertyPropID.GROUP.- Specified by:
setPropertyGroupin interfaceIOutItemTar- Parameters:
group- seePropID.GROUP- See Also:
-
getPropertySymLink
Get propertyPropID.SYM_LINK.- Specified by:
getPropertySymLinkin interfaceIOutItemTar- Returns:
- symLink
- See Also:
-
setPropertySymLink
Set propertyPropID.SYM_LINK.- Specified by:
setPropertySymLinkin interfaceIOutItemTar- Parameters:
propertySymLink- seePropID.SYM_LINK- See Also:
-
getPropertyHardLink
Get propertyPropID.HARD_LINK.- Specified by:
getPropertyHardLinkin interfaceIOutItemTar- Returns:
- hardLink
- See Also:
-
setPropertyHardLink
Set propertyPropID.HARD_LINK.- Specified by:
setPropertyHardLinkin interfaceIOutItemTar- Parameters:
propertyHardLink- seePropID.HARD_LINK- See Also:
-
getPropertyIsAnti
Get propertyPropID.IS_ANTI.- Specified by:
getPropertyIsAntiin interfaceIOutItem7z- Returns:
- isAnti flag
- See Also:
-
setPropertyIsAnti
Set propertyPropID.IS_ANTI.- Specified by:
setPropertyIsAntiin interfaceIOutItem7z- Parameters:
isAnti- seePropID.IS_ANTI.- See Also:
-
getPropertyComment
Get propertyPropID.COMMENT.- Specified by:
getPropertyCommentin interfaceIOutItem7z- Returns:
- comment
- See Also:
-
setPropertyComment
Set propertyPropID.COMMENT.- Specified by:
setPropertyCommentin interfaceIOutItem7z- Parameters:
comment- seePropID.COMMENT- See Also:
-
getPropertyEncrypted
Get propertyPropID.ENCRYPTED.- Specified by:
getPropertyEncryptedin interfaceIOutItem7z- Returns:
- encrypted flag
- See Also:
-
setPropertyEncrypted
Set propertyPropID.ENCRYPTED.- Specified by:
setPropertyEncryptedin interfaceIOutItem7z- Parameters:
encrypted- seePropID.ENCRYPTED- See Also:
-
getPropertyCRC
Get propertyPropID.CRC.- Specified by:
getPropertyCRCin interfaceIOutItem7z- Returns:
- CRC checksum
- See Also:
-
setPropertyCRC
Set propertyPropID.CRC.- Specified by:
setPropertyCRCin interfaceIOutItem7z- Parameters:
crc- seePropID.CRC- See Also:
-
getUpdateIsNewData
Get whether the archive item data (content) has changed. IfisNewDataistrue,isNewPropertiesmust also betrue
Note: only relevant for archive update operations!- Specified by:
getUpdateIsNewDatain interfaceIOutItemBase- Returns:
true- the archive item has new data (always true for new archives),
false- the archive item data from the old archive can be reused.
-
setUpdateIsNewData
Set whether the archive item data (content) has changed. IfisNewDataistrue,isNewPropertiesmust also betrue.
Note: only relevant for archive update operations!- Specified by:
setUpdateIsNewDatain interfaceIOutItemBase- Parameters:
updateIsNewData-true- the archive item has new data (always true for new archives),
false- the archive item data from the old archive can be reused.
-
getUpdateIsNewProperties
Get whether the archive item properties have changed. IfisNewDataistrue,isNewPropertiesmust also betrue
Note: only relevant for archive update operations!- Specified by:
getUpdateIsNewPropertiesin interfaceIOutItemBase- Returns:
true- the archive item has new properties (always true for new archives).
false- the archive item properties from the old archive should be reused.
-
setUpdateIsNewProperties
Set whether the archive item properties have changed. IfisNewDataistrue,isNewPropertiesmust also betrue
Note: only relevant for archive update operations!- Specified by:
setUpdateIsNewPropertiesin interfaceIOutItemBase- Parameters:
updateIsNewProperties-true- the archive item has new properties (always true for new archives).
false- the archive item properties from the old archive should be reused.
-
getUpdateOldArchiveItemIndex
Get the index of the archive item in the archive being updated (old archive). Mandatory, ifisNewDataorisNewPropertiesset.
Note: only relevant for archive update operations!- Specified by:
getUpdateOldArchiveItemIndexin interfaceIOutItemBase- Returns:
- corresponding index of the archive item in the old archive (starting from 0).
-1if bothisNewDataandisNewPropertiesaretrue.
-
setUpdateOldArchiveItemIndex
Set the index of the archive item in the archive being updated (old archive).
Note: only relevant for archive update operations!- Specified by:
setUpdateOldArchiveItemIndexin interfaceIOutItemBase- Parameters:
updateOldArchiveItemIndex- corresponding index of the archive item in the old archive (starting from 0).
-1if there is no corresponding archive item in the old archive or if doesn't matter (for new archives).
-