org.apache.felix.framework.util

## Class WeakZipFileFactory.WeakZipFile

- java.lang.Object
- - org.apache.felix.framework.util.WeakZipFileFactory.WeakZipFile

Enclosing class:
  WeakZipFileFactory

    public class WeakZipFileFactory.WeakZipFile
    extends Object

This class wraps a ZipFile to making it possible to weakly close it; this means the underlying zip file will be automatically reopened on demand if anyone tries to use it.

### Method Summary

All Methods Instance Methods Concrete Methods
`void` `close()` This method permanently closes the zip file.
`Enumeration<ZipEntry>` `entries()` Returns an enumeration of zip entries from the zip file.
`ZipEntry` `getEntry(String name)` Returns the specified entry from the zip file.
`InputStream` `getInputStream(ZipEntry ze)` Returns an input stream for the specified zip entry.
`Enumeration<String>` `names()`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Method Detail

#### getEntry

    public ZipEntry getEntry(String name)

Returns the specified entry from the zip file.

Parameters:
  `name` - the name of the entry to return.
Returns:
  the zip entry associated with the specified name or null if it does not exist.

#### entries

    public Enumeration<ZipEntry> entries()

Returns an enumeration of zip entries from the zip file.

Returns:
  an enumeration of zip entries.

#### names

    public Enumeration<String> names()

#### getInputStream

    public InputStream getInputStream(ZipEntry ze)
                               throws IOException

Returns an input stream for the specified zip entry.

Parameters:
  `ze` - the zip entry whose input stream is to be retrieved.
Returns:
  an input stream to the zip entry.
Throws:
  `IOException` - if the input stream cannot be opened.

#### close

    public void close()
               throws IOException

This method permanently closes the zip file.

Throws:
  `IOException` - if any error occurs while trying to close the zip file.