|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectadams.core.io.ZipUtils
public class ZipUtils
A helper class for ZIP-file related tasks.
| Constructor Summary | |
|---|---|
ZipUtils()
|
|
| Method Summary | |
|---|---|
static String |
compress(File output,
File[] files)
Creates a zip file from the specified files. |
static String |
compress(File output,
File[] files,
int bufferSize)
Creates a zip file from the specified files. |
static String |
compress(File output,
File[] files,
String stripRegExp,
int bufferSize)
Creates a zip file from the specified files. |
static List<File> |
decompress(File input,
File outputDir)
Unzips the files in a ZIP file. |
static List<File> |
decompress(File input,
File outputDir,
boolean createDirs)
Unzips the files in a ZIP file. |
static List<File> |
decompress(File input,
File outputDir,
boolean createDirs,
BaseRegExp match,
boolean invertMatch)
Unzips the files in a ZIP file. |
static List<File> |
decompress(File input,
File outputDir,
boolean createDirs,
BaseRegExp match,
boolean invertMatch,
int bufferSize)
Unzips the files in a ZIP file. |
static List<File> |
decompress(File input,
File outputDir,
boolean createDirs,
BaseRegExp match,
boolean invertMatch,
int bufferSize,
StringBuilder errors)
Unzips the files in a ZIP file. |
static boolean |
decompress(File input,
String archiveFile,
File output)
Unzips the specified file from a ZIP file. |
static boolean |
decompress(File input,
String archiveFile,
File output,
boolean createDirs)
Unzips the specified file from a ZIP file. |
static boolean |
decompress(File input,
String archiveFile,
File output,
boolean createDirs,
int bufferSize,
StringBuilder errors)
Unzips the specified file from a ZIP file. |
static List<File> |
listFiles(File input)
Lists the files stored in the ZIP file. |
static List<File> |
listFiles(File input,
boolean listDirs)
Lists the files stored in the ZIP file. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ZipUtils()
| Method Detail |
|---|
public static String compress(File output,
File[] files)
output - the output file to generatefiles - the files to store in the zip file
compress(File, File[], int)
public static String compress(File output,
File[] files,
int bufferSize)
output - the output file to generatefiles - the files to store in the zip filebufferSize - the buffer size to use
compress(File, File[], String, int)
public static String compress(File output,
File[] files,
String stripRegExp,
int bufferSize)
output - the output file to generatefiles - the files to store in the zip filestripRegExp - the regular expression used to strip the file namesbufferSize - the buffer size to use
public static List<File> decompress(File input,
File outputDir)
input - the ZIP file to unzipoutputDir - the directory where to store the extracted files
decompress(File, File, boolean)
public static List<File> decompress(File input,
File outputDir,
boolean createDirs)
input - the ZIP file to unzipoutputDir - the directory where to store the extracted filescreateDirs - whether to re-create the directory structure from the
ZIP file
#decompress(File, File, boolean, String, boolean)
public static List<File> decompress(File input,
File outputDir,
boolean createDirs,
BaseRegExp match,
boolean invertMatch)
input - the ZIP file to unzipoutputDir - the directory where to store the extracted filescreateDirs - whether to re-create the directory structure from the
ZIP filematch - the regular expression that the files are matched againstinvertMatch - whether to invert the matching sense
#decompress(File, File, boolean, String, boolean, int)
public static List<File> decompress(File input,
File outputDir,
boolean createDirs,
BaseRegExp match,
boolean invertMatch,
int bufferSize)
input - the ZIP file to unzipoutputDir - the directory where to store the extracted filescreateDirs - whether to re-create the directory structure from the
ZIP filematch - the regular expression that the files are matched againstinvertMatch - whether to invert the matching sensebufferSize - the buffer size to use
public static List<File> decompress(File input,
File outputDir,
boolean createDirs,
BaseRegExp match,
boolean invertMatch,
int bufferSize,
StringBuilder errors)
input - the ZIP file to unzipoutputDir - the directory where to store the extracted filescreateDirs - whether to re-create the directory structure from the
ZIP filematch - the regular expression that the files are matched againstinvertMatch - whether to invert the matching sensebufferSize - the buffer size to useerrors - for storing potential errors
public static boolean decompress(File input,
String archiveFile,
File output)
input - the ZIP file to unziparchiveFile - the file from the archive to extractoutput - the name of the output file
public static boolean decompress(File input,
String archiveFile,
File output,
boolean createDirs)
input - the ZIP file to unziparchiveFile - the file from the archive to extractoutput - the name of the output filecreateDirs - whether to create the directory structure represented
by output file
public static boolean decompress(File input,
String archiveFile,
File output,
boolean createDirs,
int bufferSize,
StringBuilder errors)
input - the ZIP file to unziparchiveFile - the file from the archive to extractoutput - the name of the output filecreateDirs - whether to create the directory structure represented
by output filebufferSize - the buffer size to useerrors - for storing potential errors
public static List<File> listFiles(File input)
input - the ZIP file to obtain the file list from
public static List<File> listFiles(File input,
boolean listDirs)
input - the ZIP file to obtain the file list fromlistDirs - whether to include directories in the list
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||