Package ru.bgcrm.util
Class ZipUtils
java.lang.Object
ru.bgcrm.util.ZipUtils
ZIP utils.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ZipEntryaddEntry(ZipOutputStream zos, String name, String content) Add named entry in ZIP, and close it after.getEntriesFromZip(ZipInputStream zis, String subst) Extracts entries from a ZIP with name's substring.getFileEntriesFromZipByPrefix(ZipInputStream zis, String prefix) Extracts entries from ZIP by name prefix.
-
Constructor Details
-
ZipUtils
public ZipUtils()
-
-
Method Details
-
addEntry
public static ZipEntry addEntry(ZipOutputStream zos, String name, String content) throws IOException Add named entry in ZIP, and close it after.- Parameters:
zos-name- - name.content- - if not null content, encoded with UTF-8.- Throws:
IOException
-
getFileEntriesFromZipByPrefix
public static SortedMap<String,byte[]> getFileEntriesFromZipByPrefix(ZipInputStream zis, String prefix) Extracts entries from ZIP by name prefix.- Parameters:
zis-prefix-- Returns:
-
getEntriesFromZip
Extracts entries from a ZIP with name's substring.- Parameters:
zis-subst- substring.- Returns:
-