Package ru.bgcrm.util

Class ZipUtils

java.lang.Object
ru.bgcrm.util.ZipUtils

public class ZipUtils extends Object
ZIP utils.
  • 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

      public static Map<String,byte[]> getEntriesFromZip(ZipInputStream zis, String subst)
      Extracts entries from a ZIP with name's substring.
      Parameters:
      zis -
      subst - substring.
      Returns: