Package eu.europa.esig.dss.asic.common
Class ZipUtils
java.lang.Object
eu.europa.esig.dss.asic.common.ZipUtils
public final class ZipUtils extends Object
The class is used for processing (reading and creation) of ZIP archives
See zipContainerHandler
-
Method Summary
Modifier and Type Method Description DSSDocument
createZipArchive(List<DSSDocument> containerEntries, Date creationTime, String zipComment)
Creates a ZIP-Archive with the givencontainerEntries
List<DSSDocument>
extractContainerContent(DSSDocument zipPackage)
Extracts a list ofDSSDocument
from the given ZIP-archiveList<String>
extractEntryNames(DSSDocument zipPackage)
Returns a list of ZIP archive entry namesstatic ZipUtils
getInstance()
Returns an instance of the ZipUtils classvoid
setZipContainerHandler(ZipContainerHandler zipContainerHandler)
Sets a handler to process ZIP-content retrieving Default :SecureContainerHandler
-
Method Details
-
getInstance
Returns an instance of the ZipUtils class- Returns:
ZipUtils
singleton
-
setZipContainerHandler
Sets a handler to process ZIP-content retrieving Default :SecureContainerHandler
- Parameters:
zipContainerHandler
-ZipContainerHandler
-
extractContainerContent
Extracts a list ofDSSDocument
from the given ZIP-archive- Parameters:
zipPackage
-DSSDocument
- Returns:
- a list of
DSSDocument
s
-
extractEntryNames
Returns a list of ZIP archive entry names- Parameters:
zipPackage
-DSSDocument
- Returns:
- a list of
String
entry names
-
createZipArchive
public DSSDocument createZipArchive(List<DSSDocument> containerEntries, Date creationTime, String zipComment)Creates a ZIP-Archive with the givencontainerEntries
- Parameters:
containerEntries
- a list ofDSSDocument
s to embed into the new container instancecreationTime
- (Optional)Date
defined time of an archive creation, will be set for all embedded files. If null, the local current time will be usedzipComment
- (Optional)String
defined a zipComment- Returns:
DSSDocument
ZIP-Archive
-