Package eu.europa.esig.dss.asic.common
Class DSSZipEntry
java.lang.Object
eu.europa.esig.dss.asic.common.DSSZipEntry
- All Implemented Interfaces:
Serializable
Contains metadata for a ZIP-container entry
- See Also:
-
Constructor Summary
ConstructorDescriptionDSSZipEntry
(String name) Default constructorDSSZipEntry
(ZipEntry zipEntry) Constructor from existingZipEntry
-
Method Summary
Modifier and TypeMethodDescriptionCreates a new copy ofZipEntry
.Gets comment defined for the ZIP entrylong
Gets the size of compressed documentint
Gets compression method for the ZIP entrylong
getCrc()
Gets CRC-32 checksum of the uncompressed documentGets creation time of the documentbyte[]
getExtra()
Gets extra field for the documentGets the last access time of the documentGets the last modification time of the documentgetName()
Gets name of the ZIP entrylong
getSize()
Gets the size of uncompressed documentvoid
setComment
(String comment) Sets comment defined for the ZIP entryvoid
setCompressionMethod
(int compressionMethod) Sets compression method for the ZIP entryvoid
setCreationTime
(FileTime creationTime) Sets creation time of the documentvoid
setCreationTime
(Date creationTime) Sets creation time of the documentvoid
setExtra
(byte[] extra) Sets extra field for the documentvoid
Sets name of the ZIP entry
-
Constructor Details
-
Method Details
-
getName
Gets name of the ZIP entry- Returns:
String
-
setName
Sets name of the ZIP entry- Parameters:
name
-String
-
getComment
Gets comment defined for the ZIP entry- Returns:
String
-
setComment
Sets comment defined for the ZIP entry- Parameters:
comment
-String
-
getCompressionMethod
public int getCompressionMethod()Gets compression method for the ZIP entry- Returns:
- int identifier of the compression method
-
setCompressionMethod
public void setCompressionMethod(int compressionMethod) Sets compression method for the ZIP entry- Parameters:
compressionMethod
- int identifier of the compression method
-
getCreationTime
Gets creation time of the document- Returns:
FileTime
-
setCreationTime
Sets creation time of the document- Parameters:
creationTime
-FileTime
-
setCreationTime
Sets creation time of the document- Parameters:
creationTime
-Date
-
getExtra
public byte[] getExtra()Gets extra field for the document- Returns:
- byte array
-
setExtra
public void setExtra(byte[] extra) Sets extra field for the document- Parameters:
extra
- byte array
-
getModificationTime
Gets the last modification time of the document- Returns:
Date
-
getLastAccessTime
Gets the last access time of the document- Returns:
Date
-
getSize
public long getSize()Gets the size of uncompressed document- Returns:
- size
-
getCompressedSize
public long getCompressedSize()Gets the size of compressed document- Returns:
- compressed size
-
getCrc
public long getCrc()Gets CRC-32 checksum of the uncompressed document- Returns:
- CRC-32 checksum
-
createZipEntry
Creates a new copy ofZipEntry
. NOTE: some fields are not copied, as they can be changed during container creation (i.e. modification time, size, crc, etc.).- Returns:
ZipEntry
-