Package eu.europa.esig.dss.asic.common
Class ZipUtils
java.lang.Object
eu.europa.esig.dss.asic.common.ZipUtils
The class is used for processing (reading and creation) of ZIP archives
See zipContainerHandler
-
Method Summary
Modifier and TypeMethodDescriptioncreateZipArchive(ASiCContent asicContent, Date creationTime) Creates a ZIP-Archive with the givenasicContentcreateZipArchive(List<DSSDocument> containerEntries, Date creationTime, String zipComment) Creates a ZIP-Archive with the givencontainerEntriesextractContainerContent(DSSDocument zipPackage) Extracts a list ofDSSDocumentfrom the given ZIP-archiveextractEntryNames(DSSDocument zipPackage) Returns a list of ZIP archive entry namesstatic ZipUtilsReturns an instance of the ZipUtils classvoidsetZipContainerHandler(ZipContainerHandler zipContainerHandler) Sets a handler to process ZIP-content retrieving Default :SecureContainerHandler
-
Method Details
-
getInstance
Returns an instance of the ZipUtils class- Returns:
ZipUtilssingleton
-
setZipContainerHandler
Sets a handler to process ZIP-content retrieving Default :SecureContainerHandler- Parameters:
zipContainerHandler-ZipContainerHandler
-
extractContainerContent
Extracts a list ofDSSDocumentfrom the given ZIP-archive- Parameters:
zipPackage-DSSDocument- Returns:
- a list of
DSSDocuments
-
extractEntryNames
Returns a list of ZIP archive entry names- Parameters:
zipPackage-DSSDocument- Returns:
- a list of
Stringentry names
-
createZipArchive
public DSSDocument createZipArchive(List<DSSDocument> containerEntries, Date creationTime, String zipComment) Creates a ZIP-Archive with the givencontainerEntries- Parameters:
containerEntries- a list ofDSSDocuments to embed into the new container instancecreationTime- (Optional)Datedefined time of an archive creation, will be set for all embedded files. If null, the local current time will be usedzipComment- (Optional)Stringdefined a zipComment- Returns:
DSSDocumentZIP-Archive
-
createZipArchive
Creates a ZIP-Archive with the givenasicContent- Parameters:
asicContent-ASiCContentto create a new ZIP Archive fromcreationTime- (Optional)Datedefined time of an archive creation, will be set for all embedded files. If null, the local current time will be used- Returns:
DSSDocumentZIP-Archive
-