ewe.util.zip
Class ZipFile
java.lang.Object
ewe.util.zip.ZipFile
- public class ZipFile
- extends Object
This class represents a Zip archive. You can ask for the contained
entries, or get an input stream for a file entry. The entry is
automatically decompressed.
This class is thread safe: You can open input streams for arbitrary
entries in different threads.
OPEN_READ
public static final int OPEN_READ
- See Also:
- Constant Field Values
OPEN_DELETE
public static final int OPEN_DELETE
- See Also:
- Constant Field Values
zip
protected ZipFile zip
name
protected String name
ZipFile
protected ZipFile()
ZipFile
public ZipFile(String name)
throws IOException,
ZipException
ZipFile
public ZipFile(File file)
throws IOException,
ZipException
ZipFile
public ZipFile(File file,
int mode)
throws IOException,
ZipException
- Open a Zip file in a particular mode.
- Parameters:
file - The Zip formatted file.mode - Ignored! Only OPEN_READ is supported.
close
public void close()
throws IOException
- Throws:
IOException
size
public int size()
entries
public Enumeration entries()
getEntry
public ZipEntry getEntry(String name)
getInputStream
public InputStream getInputStream(ZipEntry ze)
throws IOException,
ZipException,
IllegalStateException
- Throws:
IOException
ZipException
IllegalStateException
getName
public String getName()