Package org.jboss.windup.util
Class ZipUtil
- java.lang.Object
-
- org.jboss.windup.util.ZipUtil
-
public class ZipUtil extends Object
-
-
Constructor Summary
Constructors Constructor Description ZipUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static booleanendsWithZipExtension(String path)static StringgetEndsWithZipRegularExpression()static Set<String>getZipExtensions()static List<String>scanZipFile(String parentPath, InputStream is, boolean relativeOnly)static List<String>scanZipFile(Path zipFilePath, boolean relativeOnly)static voidunzipFromClassResource(Class<?> clazz, String resourcePath, File extractToPath)Unzip a classpath resource using the givenClassas the resource root path.static voidunzipToFolder(File inputFile, File outputDir)Unzip the givenFileto the specified directory.static voidzipFolder(Path source, String zipOutputPath, String zipOutputName, List<String> pathPrefixesToExclude)
-
-
-
Method Detail
-
unzipFromClassResource
public static void unzipFromClassResource(Class<?> clazz, String resourcePath, File extractToPath) throws IOException
Unzip a classpath resource using the givenClassas the resource root path.- Throws:
IOException
-
unzipToFolder
public static void unzipToFolder(File inputFile, File outputDir) throws IOException
Unzip the givenFileto the specified directory.- Throws:
IOException
-
getEndsWithZipRegularExpression
public static String getEndsWithZipRegularExpression()
-
endsWithZipExtension
public static boolean endsWithZipExtension(String path)
-
scanZipFile
public static List<String> scanZipFile(String parentPath, InputStream is, boolean relativeOnly)
-
zipFolder
public static void zipFolder(Path source, String zipOutputPath, String zipOutputName, List<String> pathPrefixesToExclude) throws IOException
- Throws:
IOException
-
-