org.apache.felix.framework.util
Class WeakZipFileFactory
java.lang.Object
org.apache.felix.framework.util.WeakZipFileFactory
public class WeakZipFileFactory
- extends Object
This class implements a factory for creating weak zip files, which behave
mostly like a ZipFile, but can be weakly closed to limit the number of
open files.
|
Nested Class Summary |
class |
WeakZipFileFactory.WeakZipFile
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. |
|
Constructor Summary |
WeakZipFileFactory(int limit)
Constructs a weak zip file factory with the specified file limit. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
WeakZipFileFactory
public WeakZipFileFactory(int limit)
- Constructs a weak zip file factory with the specified file limit. A limit
of zero signifies no limit.
- Parameters:
limit - maximum number of open zip files at any given time.
create
public WeakZipFileFactory.WeakZipFile create(File file)
throws IOException
- Factory method used to create weak zip files.
- Parameters:
file - the target zip file.
- Returns:
- the created weak zip file.
- Throws:
IOException - if the zip file could not be opened.
Copyright © 2007–2014 The Apache Software Foundation. All rights reserved.