Package net.sf.sevenzipjbinding
Interface IOutItemBase
- All Known Subinterfaces:
IOutItem7z,IOutItemAllFormats,IOutItemBZip2,IOutItemGZip,IOutItemTar,IOutItemXz,IOutItemZip
- All Known Implementing Classes:
OutItem
public interface IOutItemBase
Base interface of the archive item data interfaces:
The purpose of the archive-format-specific interfaces
- archive-format-specific interfaces
IOutItemXxx, likeIOutItem7z - archive-format-independent interface
IOutItemAllFormats
OutItem. This base interface provides access to the getters and setters
methods, that are shared by all archive formats.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 the corresponding getters and setters. The Zip archive format on the
other hand does support the attributes property defining the methods:
- Since:
- 9.20-2.00
- Author:
- Boris Brodski
-
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 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.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
-
getOutArchive
IOutArchive<?> getOutArchive()Return corresponding IOutArchive object.- Returns:
- IOutArchive
-
getArchiveFormat
ArchiveFormat getArchiveFormat()Return current archive format- Returns:
- archive format
-
getIndex
int getIndex()Return the index of the item being described in the new archive.- Returns:
- the index of the item in the archive (0-based)
-
getDataSize
Long getDataSize()Get propertyPropID.SIZE.- Returns:
- size.
- See Also:
-
setDataSize
Set propertyPropID.SIZE.- Parameters:
size- seePropID.SIZE- See Also:
-
getUpdateIsNewData
Boolean getUpdateIsNewData()Get whether the archive item data (content) has changed. IfisNewDataistrue,isNewPropertiesmust also betrue
Note: only relevant for archive update operations!- 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!- 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
Boolean getUpdateIsNewProperties()Get whether the archive item properties have changed. IfisNewDataistrue,isNewPropertiesmust also betrue
Note: only relevant for archive update operations!- 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!- 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
Integer getUpdateOldArchiveItemIndex()Get the index of the archive item in the archive being updated (old archive). Mandatory, ifisNewDataorisNewPropertiesset.
Note: only relevant for archive update operations!- 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!- 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).
-