public class ZipFiles extends Object
Modifier and Type | Method and Description |
---|---|
static String |
createEntryName(File file)
Creates a valid ZipEntry name from a file.
|
static void |
extract(ZipFile zipFile,
File toDir)
Extracts a zip file to a specified directory.
|
static void |
extract(ZipFile zipFile,
ZipEntry zipEntry,
File toDir)
Extracts an entry of a zip file to a specified directory.
|
public static void extract(ZipFile zipFile, File toDir) throws IOException
zipFile
- the zip file to extracttoDir
- the target directoryIOException
public static void extract(ZipFile zipFile, ZipEntry zipEntry, File toDir) throws IOException
zipFile
- the zip file to extract fromzipEntry
- the entry of the zip file to extracttoDir
- the target directoryIOException
public static String createEntryName(File file)
file
- the file the entry name gets created from. Copyright © 2002–2016 SoftSmithy. All rights reserved.