Package org.apache.felix.framework.util
Class WeakZipFileFactory.WeakZipFile
java.lang.Object
org.apache.felix.framework.util.WeakZipFileFactory.WeakZipFile
- Enclosing class:
WeakZipFileFactory
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 Details
-
getEntry
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
Returns an enumeration of zip entries from the zip file.- Returns:
- an enumeration of zip entries.
-
getInputStream
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
This method permanently closes the zip file.- Throws:
IOException
- if any error occurs while trying to close the zip file.
-