|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.dmonix.util.zip.ZipReader
Class for reading/inflating entries in a ZIP file.
Copyright: Copyright (c) 2001
Company: dmonix.org
| Method Summary | |
void |
close()
Close the zip file. |
java.util.zip.ZipEntry |
getEntry(java.lang.String name)
Return the ZipEntry with the matching name |
boolean |
hasMoreElements()
Check if there are more entries to fetch from the zip file |
ZipFileEntry |
nextEntry()
Return the next entry in the opened zip file |
static ZipReader |
openZipFile(java.io.File file)
Open a stream to an existing zip file. |
static ZipReader |
openZipFile(java.lang.String fileName)
Open a stream to an existing zip file. |
int |
size()
Returns the number of entries in the ZIP file. |
void |
unzip(java.util.zip.ZipEntry zipEntry,
java.io.File path)
Unzip a zip entry to the specified path. |
void |
unzip(java.util.zip.ZipEntry zipEntry,
java.io.OutputStream ostream)
Unzip a zip entry to the specified outputstream. |
void |
unzip(java.util.zip.ZipEntry zipEntry,
java.lang.String path)
Unzip a zip entry to the specified path. |
int |
unzipAll(java.io.File path)
Unzip all entries in the zip file to the specified path. |
int |
unzipAll(java.lang.String path)
Unzip all entries in the zip file to the specified path. |
boolean |
unzipNextEntry(java.io.File path)
Unzip the next entry to the specified path. |
boolean |
unzipNextEntry(java.io.OutputStream ostream)
Unzip the next zip entry to the specified outputstream. |
boolean |
unzipNextEntry(java.lang.String path)
Unzip the next entry to the specified path. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
public void close()
throws java.io.IOException
java.io.IOExceptionpublic int size()
public java.util.zip.ZipEntry getEntry(java.lang.String name)
throws java.io.IOException
name - Name of the ZipEntry
java.io.IOExceptionpublic boolean hasMoreElements()
public ZipFileEntry nextEntry()
throws java.io.IOException
java.io.IOException
public static ZipReader openZipFile(java.io.File file)
throws java.io.IOException
file - The zip file object
java.io.IOException
public static ZipReader openZipFile(java.lang.String fileName)
throws java.io.IOException
fileName - The zip file
java.io.IOException
public void unzip(java.util.zip.ZipEntry zipEntry,
java.io.File path)
throws java.io.IOException
zipEntry - The zip entry to inflatepath - The path where to deflate the entry
java.io.IOException
public void unzip(java.util.zip.ZipEntry zipEntry,
java.io.OutputStream ostream)
throws java.io.IOException
zipEntry - The zip entry to inflateostream - The outputstream to write the deflated data to
java.io.IOException
public void unzip(java.util.zip.ZipEntry zipEntry,
java.lang.String path)
throws java.io.IOException
zipEntry - The zip entry to inflatepath - The path where to deflate the entry
java.io.IOException
public int unzipAll(java.io.File path)
throws java.io.IOException
path - The path where to deflate the entries
java.io.IOException
public int unzipAll(java.lang.String path)
throws java.io.IOException
path - The path where to deflated the entries
java.io.IOException
public boolean unzipNextEntry(java.io.File path)
throws java.io.IOException
nextEntry()
path - The path where to deflate the entry
java.io.IOException
public boolean unzipNextEntry(java.io.OutputStream ostream)
throws java.io.IOException
ostream - The outputstream to write the deflated data to
java.io.IOException
public boolean unzipNextEntry(java.lang.String path)
throws java.io.IOException
nextEntry()
path - The path where to deflate the entry
java.io.IOException
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||