public class WeakZipFileFactory
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
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.
|
| Modifier and Type | Field and Description |
|---|---|
private static int |
CLOSED |
private Mutex |
m_globalMutex |
private int |
m_limit |
private java.util.List<WeakZipFileFactory.WeakZipFile> |
m_openFiles |
private static SecureAction |
m_secureAction |
private java.util.List<WeakZipFileFactory.WeakZipFile> |
m_zipFiles |
private static int |
OPEN |
private static int |
WEAKLY_CLOSED |
| Constructor and Description |
|---|
WeakZipFileFactory(int limit)
Constructs a weak zip file factory with the specified file limit.
|
| Modifier and Type | Method and Description |
|---|---|
WeakZipFileFactory.WeakZipFile |
create(java.io.File file)
Factory method used to create weak zip files.
|
(package private) java.util.List<WeakZipFileFactory.WeakZipFile> |
getOpenZipZiles()
Only used for testing.
|
(package private) java.util.List<WeakZipFileFactory.WeakZipFile> |
getZipZiles()
Only used for testing.
|
private static final int WEAKLY_CLOSED
private static final int OPEN
private static final int CLOSED
private static final SecureAction m_secureAction
private final java.util.List<WeakZipFileFactory.WeakZipFile> m_zipFiles
private final java.util.List<WeakZipFileFactory.WeakZipFile> m_openFiles
private final Mutex m_globalMutex
private final int m_limit
public WeakZipFileFactory(int limit)
limit - maximum number of open zip files at any given time.public WeakZipFileFactory.WeakZipFile create(java.io.File file) throws java.io.IOException
file - the target zip file.java.io.IOException - if the zip file could not be opened.java.util.List<WeakZipFileFactory.WeakZipFile> getZipZiles()
java.util.List<WeakZipFileFactory.WeakZipFile> getOpenZipZiles()