|
VdexReload 1.1.3 API | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectuk.ac.reload.dweezil.util.ZipUtils
Some useful Zip Utilities
Field Summary |
Fields inherited from interface uk.ac.reload.dweezil.DweezilConstants |
CR, DEBUG |
Constructor Summary | |
ZipUtils()
|
Method Summary | |
static boolean |
addFileToZip(java.io.File file,
java.lang.String entryName,
java.util.zip.ZipOutputStream zOut)
Adds a file to the Zip file |
static void |
addFolderToZip(java.io.File rootFolder,
java.io.File folder,
java.util.zip.ZipOutputStream zOut,
java.io.File zipFile)
Add all files and sub-files to the Zip |
static boolean |
addStringToZip(java.lang.String text,
java.lang.String entryName,
java.util.zip.ZipOutputStream zOut)
Adds a String as a field entry to the Zip file |
static java.lang.String |
extractZipEntry(java.io.File zipFile,
java.lang.String entryName)
Extracts a named entry out of the zip file and returns the entry as a String Returns null if weirdness happens |
static java.io.File |
extractZipEntry(java.io.File zipFile,
java.lang.String entryName,
java.io.File outFile)
Extracts a named entry out of the zip file to the specified file Returns the File ref if OK or null if something wierd happens |
static java.lang.String[] |
getZipFileEntryNames(java.io.File zipFile)
Gets all file names out of a zip file Returns an array of String names or null if none |
static boolean |
unpackZip(java.io.File zipFile,
java.io.File folder)
Extracts all entries out of the zip file to the specified folder. |
static boolean |
unpackZip(java.io.File zipFile,
java.io.File folder,
ReloadProgressMonitor progressMonitor)
Extracts all entries out of the zip file to the specified folder Returns true or false to indicate if the progress cancel was pressed |
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 void addFolderToZip(java.io.File rootFolder, java.io.File folder, java.util.zip.ZipOutputStream zOut, java.io.File zipFile) throws DweezilZipException
rootFolder
- the root folderfolder
- the folder to add to the zipzOut
- the zip output streamzipFile
- the zip file
DweezilZipException
public static boolean addFileToZip(java.io.File file, java.lang.String entryName, java.util.zip.ZipOutputStream zOut) throws DweezilZipException
file
- the file to add to the zipentryName
- the name of the new zip entryzOut
- the zip output stream
DweezilZipException
public static boolean addStringToZip(java.lang.String text, java.lang.String entryName, java.util.zip.ZipOutputStream zOut) throws DweezilZipException
text
- the string to add as a field entry to the zip fileentryName
- the name of the new zip entryzOut
- the zip output stream
DweezilZipException
public static java.lang.String extractZipEntry(java.io.File zipFile, java.lang.String entryName) throws DweezilZipException
zipFile
- the zip fileentryName
- the name of the new zip entry
DweezilZipException
public static java.io.File extractZipEntry(java.io.File zipFile, java.lang.String entryName, java.io.File outFile) throws DweezilZipException
zipFile
- the zip file from which you extract the named entryentryName
- the name of the new zip entryoutFile
- the specified zip file to which you add the entry
DweezilZipException
public static java.lang.String[] getZipFileEntryNames(java.io.File zipFile) throws DweezilZipException
zipFile
- the zip file from which we are trying to get all file names
DweezilZipException
public static boolean unpackZip(java.io.File zipFile, java.io.File folder) throws DweezilZipException
zipFile
- the zip file concernedfolder
- the folder into which you want to extract the contents of the zip file
DweezilZipException
public static boolean unpackZip(java.io.File zipFile, java.io.File folder, ReloadProgressMonitor progressMonitor) throws DweezilZipException
zipFile
- the zip file concernedfolder
- the folder into which you want to extract the contents of the zip fileprogressMonitor
- the progress monitor showing you the progress of the unzipping
DweezilZipException
|
VdexReload 1.1.3 API | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |