Class ZipUtil

java.lang.Object
io.micronaut.starter.util.ZipUtil

public class ZipUtil extends Object
Utility class for ZIP operations.
Since:
1.0.0
Author:
graemerocher
  • Constructor Details

    • ZipUtil

      public ZipUtil()
  • Method Details

    • isZip

      public static boolean isZip(byte[] bytes)
      Are the given bytes a zip file.
      Parameters:
      bytes - The bytes
      Returns:
      True if they are
    • containsFile

      public static boolean containsFile(byte[] bytes, String filename)
      Does the specified zip bytes contain the specified file.
      Parameters:
      bytes - The bytes
      filename - The file name
      Returns:
      True if it does
    • containsFileWithContents

      public static boolean containsFileWithContents(byte[] bytes, String filename, String contents)
      Does the specified zip bytes contain the specified file.
      Parameters:
      bytes - The bytes
      filename - The file name
      contents - Contents
      Returns:
      True if it does