net.sf.sevenzipjbinding
Interface IOutItemBase

All Known Subinterfaces:
IOutItem7z, IOutItemAllFormats, IOutItemBZip2, IOutItemGZip, IOutItemTar, IOutItemZip
All Known Implementing Classes:
OutItem

public interface IOutItemBase

Base interface of the archive item data interfaces:

The single known implementation is 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 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

Method Summary
 ArchiveFormat getArchiveFormat()
          Return current archive format
 java.lang.Long getDataSize()
          Get property PropID.SIZE.
 int getIndex()
          Return the index of the item being described in the new archive.
 IOutArchive<?> getOutArchive()
          Return corresponding IOutArchive object.
 java.lang.Boolean getUpdateIsNewData()
          Get whether the archive item data (content) has changed.
 java.lang.Boolean getUpdateIsNewProperties()
          Get whether the archive item properties have changed.
 java.lang.Integer getUpdateOldArchiveItemIndex()
          Get the index of the archive item in the archive being updated (old archive).
 void setDataSize(java.lang.Long size)
          Set property PropID.SIZE.
 void setUpdateIsNewData(java.lang.Boolean updateIsNewData)
          Set whether the archive item data (content) has changed.
 void setUpdateIsNewProperties(java.lang.Boolean updateIsNewProperties)
          Set whether the archive item properties have changed.
 void setUpdateOldArchiveItemIndex(java.lang.Integer updateOldArchiveItemIndex)
          Set the index of the archive item in the archive being updated (old archive).
 

Method Detail

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

java.lang.Long getDataSize()
Get property PropID.SIZE.

Returns:
size.
See Also:
PropID.SIZE

setDataSize

void setDataSize(java.lang.Long size)
Set property PropID.SIZE.

Parameters:
size - see PropID.SIZE
See Also:
PropID.SIZE

getUpdateIsNewData

java.lang.Boolean getUpdateIsNewData()
Get whether the archive item data (content) has changed. If isNewData is true, isNewProperties must also be true

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

void setUpdateIsNewData(java.lang.Boolean updateIsNewData)
Set whether the archive item data (content) has changed. If isNewData is true, isNewProperties must also be true.

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

java.lang.Boolean getUpdateIsNewProperties()
Get whether the archive item properties have changed. If isNewData is true, isNewProperties must also be true

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

void setUpdateIsNewProperties(java.lang.Boolean updateIsNewProperties)
Set whether the archive item properties have changed. If isNewData is true, isNewProperties must also be true

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

java.lang.Integer getUpdateOldArchiveItemIndex()
Get the index of the archive item in the archive being updated (old archive). Mandatory, if isNewData or isNewProperties set.

Note: only relevant for archive update operations!

Returns:
corresponding index of the archive item in alsothe old archive (starting from 0).
-1 if both isNewData and isNewProperties are true.

setUpdateOldArchiveItemIndex

void setUpdateOldArchiveItemIndex(java.lang.Integer updateOldArchiveItemIndex)
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).
-1 if there is no corresponding archive item in the old archive or if doesn't matter (for new archives).