Package de.uplanet.io
Klasse ZipHelper
java.lang.Object
de.uplanet.io.ZipHelper
IOHelper class utility
-
Konstruktorübersicht
Konstruktoren -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungstatic voidVeraltet.static voidVeraltet.static voidExtract a ZIP archive to a directory.static voidstatic voidVeraltet.static booleanVeraltet.static voidunzipDir(ZipInputStream p_zip, File p_dirDst) Veraltet.static voidunzipDir(ZipInputStream p_zip, String p_strPrefixFilter, File p_dirDst) Veraltet.static voidunzipDir(ZipInputStream p_zip, Path p_dirDst) Extract a ZIP stream into a directory.static booleanunzipDirectories(ZipFile p_zip, Path p_dirDst, de.uplanet.util.Progress p_progress, boolean p_bExcludeMode, String... p_rootDirs) Copy a directory recursively from a ZIP file.
p_dirDstis the parent directory of the new directory.static booleanunzipDirectories(ZipFile p_zip, Path p_dirDst, de.uplanet.util.Progress p_progress, String... p_rootDirs) Copy a directory recursively from a ZIP file.
p_dirDstis the parent directory of the new directory.static voidVeraltet.static voidCopy a directory recursively to a ZIP file.static voidzipDir(Path p_fileZip, Path p_dirSrc, DirectoryStream.Filter<Path> p_filter) Copy a directory recursively to a ZIP file.static voidzipDir(ZipOutputStream p_zip, String p_strRootDir, File p_dirSrc) Veraltet.static voidzipDir(ZipOutputStream p_zip, String p_strRootDir, File p_dirSrc, boolean p_bZipMarkedDirs, Set<File> p_filesToExclude) Veraltet.static voidzipDir(ZipOutputStream p_zip, String p_strRootDir, Path p_dirSrc) Copy a directory recursively to a ZIP output stream.static voidzipDir(ZipOutputStream p_zip, String p_strRootDir, Path p_dirSrc, boolean p_bZipMarkedDirs, DirectoryStream.Filter<Path> p_filter) Copy a directory recursively to a ZIP output stream.static voidzipDir(ZipOutputStream p_zip, String p_strRootDir, Path p_dirSrc, boolean p_bZipMarkedDirs, DirectoryStream.Filter<Path> p_filter, de.uplanet.util.Progress p_progress) Copy a directory recursively to a ZIP output stream.static voidzipDir(ZipOutputStream p_zip, String p_strRootDir, Path p_dirSrc, boolean p_bZipMarkedDirs, Set<Path> p_filesToExclude) Veraltet.
-
Konstruktordetails
-
ZipHelper
public ZipHelper()
-
-
Methodendetails
-
zipDir
Copy a directory recursively to a ZIP file.- Parameter:
p_fileZip- The output file.p_dirSrc- The directory to be archived.- Löst aus:
IOException- If an I/O-error occurs.
-
zipDir
public static void zipDir(Path p_fileZip, Path p_dirSrc, DirectoryStream.Filter<Path> p_filter) throws IOException Copy a directory recursively to a ZIP file.- Parameter:
p_fileZip- The output file.p_dirSrc- The directory to be archived.p_filter- A filter for files and directories (must not benull).- Löst aus:
IOException- If an I/O-error occurs.
-
zipDir
public static void zipDir(ZipOutputStream p_zip, String p_strRootDir, Path p_dirSrc) throws IOException Copy a directory recursively to a ZIP output stream.- Parameter:
p_zip- A ZIP output stream.p_strRootDir- The root directory for the added files, or null, if top level.p_dirSrc- The directory to copy.- Löst aus:
IOException- If an I/O-error occurs.
-
zipDir
@Deprecated public static void zipDir(ZipOutputStream p_zip, String p_strRootDir, Path p_dirSrc, boolean p_bZipMarkedDirs, Set<Path> p_filesToExclude) throws IOException Veraltet.- Löst aus:
IOException
-
zipDir
public static void zipDir(ZipOutputStream p_zip, String p_strRootDir, Path p_dirSrc, boolean p_bZipMarkedDirs, DirectoryStream.Filter<Path> p_filter) throws IOException Copy a directory recursively to a ZIP output stream.p_destis the parent directory of the new directory.- Parameter:
p_zip- The ZIP output stream.p_strRootDir- The root directory for the added files, or null, if top level.p_dirSrc- The directory to copy.p_bZipMarkedDirs- Zips directories, even if they are marked with a ".noexport" file. If this parameter is set to false, the destination directory entry is created with a .noxexport entry as the only content.p_filter- A filter for files and directories (must not benull).- Löst aus:
IOException- If an I/O-error occurs.- Seit:
- Intrexx 9.0.
-
zipDir
public static void zipDir(ZipOutputStream p_zip, String p_strRootDir, Path p_dirSrc, boolean p_bZipMarkedDirs, DirectoryStream.Filter<Path> p_filter, de.uplanet.util.Progress p_progress) throws IOException Copy a directory recursively to a ZIP output stream.p_destis the parent directory of the new directory.- Parameter:
p_zip- The ZIP output stream.p_strRootDir- The root directory for the added files, or null, if top level.p_dirSrc- The directory to copy.p_bZipMarkedDirs- Zips directories, even if they are marked with a ".noexport" file. If this parameter is set to false, the destination directory entry is created with a .noxexport entry as the only content.p_filter- A filter for files and directories (must not benull).p_progress- The progress. Could benull.- Löst aus:
IOException- If an I/O-error occurs.- Seit:
- Intrexx 11.9.0.
-
unzipDir
Extract a ZIP stream into a directory.For security reasons this method prevents files from being created outside the specified destination directory.
- Parameter:
p_zip- The stream to be uzipped.p_dirDst- The destination directory.- Löst aus:
IOException- If an I/O-error occurs.
-
unzipDir
Extract a ZIP archive to a directory.- Parameter:
p_fileZip- The file to be uzipped.p_dirDst- The destination directory.- Löst aus:
IOException- If an I/O-error occurs.
-
unzipDir
- Löst aus:
IOException
-
unzipDirectories
public static boolean unzipDirectories(ZipFile p_zip, Path p_dirDst, de.uplanet.util.Progress p_progress, String... p_rootDirs) throws IOException Copy a directory recursively from a ZIP file.
p_dirDstis the parent directory of the new directory.- Parameter:
p_zip- The file to be uzipped.p_dirDst- The destination directory.p_progress- The progress callback to be used. May benull.p_rootDirs- The root dirs of the files in the zip, or none if top level, Entry started with --exclude: will be excluded.- Gibt zurück:
- true, if this method created any files or directories, false otherwise
- Löst aus:
IOException- If an I/O-error occurs.
-
unzipDirectories
public static boolean unzipDirectories(ZipFile p_zip, Path p_dirDst, de.uplanet.util.Progress p_progress, boolean p_bExcludeMode, String... p_rootDirs) throws IOException Copy a directory recursively from a ZIP file.
p_dirDstis the parent directory of the new directory.- Parameter:
p_zip- The file to be uzipped.p_dirDst- The destination directory.p_progress- The progress callback to be used. May benull.p_bExcludeMode- IftrueThe directories given in rootDirs will be excludes otherwise only the directories given in p_rootDirs will unpacked.p_rootDirs- The root dirs of the files in the zip, or none if top level.- Gibt zurück:
- true, if this method created any files or directories, false otherwise
- Löst aus:
IOException- If an I/O-error occurs.- Seit:
- Intrexx 11.9.0.
-
zipDir
Veraltet.- Löst aus:
IOException
-
zipDir
@Deprecated public static void zipDir(ZipOutputStream p_zip, String p_strRootDir, File p_dirSrc) throws IOException Veraltet.- Löst aus:
IOException
-
zipDir
@Deprecated public static void zipDir(ZipOutputStream p_zip, String p_strRootDir, File p_dirSrc, boolean p_bZipMarkedDirs, Set<File> p_filesToExclude) throws IOException Veraltet.- Löst aus:
IOException
-
unzipDir
@Deprecated public static void unzipDir(ZipInputStream p_zip, String p_strPrefixFilter, File p_dirDst) Veraltet. -
unzipDir
Veraltet.- Löst aus:
IOException
-
unzipDir
Veraltet.- Löst aus:
IOException
-
unzipDir
@Deprecated public static void unzipDir(File p_zip, File p_dirDst, String p_strEncoding) throws IOException Veraltet.- Löst aus:
IOException
-
unzipDir
@Deprecated public static void unzipDir(ZipFile p_zip, String p_strRootDir, File p_dirDst) throws IOException Veraltet.- Löst aus:
IOException
-
unzipDir
@Deprecated public static boolean unzipDir(ZipFile p_zip, String p_strRootDir, File p_dirDst, de.uplanet.util.Progress p_progress) throws IOException Veraltet.- Löst aus:
IOException
-
zipDir(ZipOutputStream, String, Path, boolean, java.nio.file.DirectoryStream.Filter)instead.