/** * Unwraps a ZIP file to the given directory shaving of root dir. * If there are multiple root dirs or entries in the root of zip, * ZipException is thrown. * <p> * The output directory must not be a file. * * @param zip * input ZIP file. * @param outputDir * output directory (created automatically if not found). */ public static void unwrap(File zip, final File outputDir) { unwrap(zip, outputDir, IdentityNameMapper.INSTANCE); }
/** * Unwraps a ZIP file to the given directory shaving of root dir. * If there are multiple root dirs or entries in the root of zip, * ZipException is thrown. * <p> * The output directory must not be a file. * * @param is * inputstream for ZIP file. * @param outputDir * output directory (created automatically if not found). */ public static void unwrap(InputStream is, File outputDir) { unwrap(is, outputDir, IdentityNameMapper.INSTANCE); }
@Signature public static void unwrap(PZipFile zip, File outputDir, @Nullable Invoker callback) throws FileNotFoundException { if (!zip.zipFile.isFile()) { throw new FileNotFoundException(zip.zipFile.getPath() + " not found"); } NameMapper mapper = invokerToNameMapper(callback); ZipUtil.unwrap(zip.zipFile, outputDir, mapper); }
/** * Unwraps a ZIP file to the given directory shaving of root dir. * If there are multiple root dirs or entries in the root of zip, * ZipException is thrown. * <p> * The output directory must not be a file. * * @param is * inputstream for ZIP file. * @param outputDir * output directory (created automatically if not found). */ public static void unwrap(InputStream is, File outputDir) { unwrap(is, outputDir, IdentityNameMapper.INSTANCE); }
/** * Unwraps a ZIP file to the given directory shaving of root dir. * If there are multiple root dirs or entries in the root of zip, * ZipException is thrown. * <p> * The output directory must not be a file. * * @param zip * input ZIP file. * @param outputDir * output directory (created automatically if not found). */ public static void unwrap(File zip, final File outputDir) { unwrap(zip, outputDir, IdentityNameMapper.INSTANCE); }