Package io.micronaut.starter.util
Class ZipUtil
java.lang.Object
io.micronaut.starter.util.ZipUtil
Utility class for ZIP operations.
- Since:
- 1.0.0
- Author:
- graemerocher
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
containsFile
(byte[] bytes, String filename) Does the specified zip bytes contain the specified file.static boolean
containsFileWithContents
(byte[] bytes, String filename, String contents) Does the specified zip bytes contain the specified file.static boolean
isZip
(byte[] bytes) Are the given bytes a zip file.
-
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
Does the specified zip bytes contain the specified file.- Parameters:
bytes
- The bytesfilename
- The file name- Returns:
- True if it does
-
containsFileWithContents
Does the specified zip bytes contain the specified file.- Parameters:
bytes
- The bytesfilename
- The file namecontents
- Contents- Returns:
- True if it does
-