Package org.basex.io
Class Zip
java.lang.Object
org.basex.core.jobs.Job
org.basex.io.Zip
Contains methods for zipping and unzipping archives.
- Author:
- BaseX Team 2005-21, BSD License, Christian Gruen
-
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondoubleReturns a progress value (0 - 1).byte[]Returns the contents of a zip file entry.voidUnzips the archive to the specified directory.voidzip(IOFile root, StringList files) Zips the specified files.
-
Constructor Details
-
Zip
Constructor.- Parameters:
file- archive file
-
-
Method Details
-
read
Returns the contents of a zip file entry.- Parameters:
path- file to be read- Returns:
- resulting byte array
- Throws:
IOException- I/O exception
-
unzip
Unzips the archive to the specified directory.- Parameters:
target- target path- Throws:
IOException- I/O exception
-
zip
Zips the specified files.- Parameters:
root- root directoryfiles- files to add- Throws:
IOException- I/O exception
-
progressInfo
public double progressInfo()Description copied from class:JobReturns a progress value (0 - 1). Can be overwritten to give more specific feedback.- Overrides:
progressInfoin classJob- Returns:
- header information
-