|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.osgi.baseadaptor.bundlefile.BundleFile
org.eclipse.osgi.baseadaptor.bundlefile.ZipBundleFile
public class ZipBundleFile
A BundleFile that uses a ZipFile as it base file.
Field Summary | |
---|---|
protected BaseData |
bundledata
The bundle data |
protected boolean |
closed
The closed flag |
protected static MRUBundleFileList |
mruList
|
protected java.util.zip.ZipFile |
zipFile
The zip file |
Fields inherited from class org.eclipse.osgi.baseadaptor.bundlefile.BundleFile |
---|
basefile, PROP_SETPERMS_CMD |
Constructor Summary | |
---|---|
ZipBundleFile(java.io.File basefile,
BaseData bundledata)
Constructs a ZipBundle File |
Method Summary | |
---|---|
protected java.util.zip.ZipFile |
basicOpen()
Opens the ZipFile for this bundle file |
protected boolean |
checkedOpen()
Checks if the zip file is open |
void |
close()
Closes the BundleFile. |
boolean |
containsDir(java.lang.String dir)
Determines if any BundleEntries exist in the given directory path. |
protected java.io.File |
extractDirectory(java.lang.String dirName)
Extracts a directory and all sub content to disk |
BundleEntry |
getEntry(java.lang.String path)
Locates a file name in this bundle and returns a BundleEntry object |
java.util.Enumeration |
getEntryPaths(java.lang.String path)
Allows to access the entries of the bundle. |
protected java.io.File |
getExtractFile(java.lang.String entryName)
|
java.io.File |
getFile(java.lang.String entry,
boolean nativeCode)
Returns a File for the bundle entry specified by the path. |
protected java.util.zip.ZipEntry |
getZipEntry(java.lang.String path)
Returns a ZipEntry for the bundle file. |
protected java.util.zip.ZipFile |
getZipFile()
Returns an open ZipFile for this bundle file. |
void |
open()
Opens the BundleFiles. |
static void |
shutdown()
Shutsdown the bundle file closer thread for zip bundle files |
Methods inherited from class org.eclipse.osgi.baseadaptor.bundlefile.BundleFile |
---|
getBaseFile, getResourceURL, getResourceURL, setPermissions |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static MRUBundleFileList mruList
protected BaseData bundledata
protected java.util.zip.ZipFile zipFile
protected boolean closed
Constructor Detail |
---|
public ZipBundleFile(java.io.File basefile, BaseData bundledata) throws java.io.IOException
basefile
- the base filebundledata
- the bundle data
java.io.IOException
Method Detail |
---|
protected boolean checkedOpen()
protected java.util.zip.ZipFile basicOpen() throws java.io.IOException
java.io.IOException
protected java.util.zip.ZipFile getZipFile() throws java.io.IOException
java.io.IOException
protected java.util.zip.ZipEntry getZipEntry(java.lang.String path)
path
- the path to an entry
protected java.io.File extractDirectory(java.lang.String dirName)
dirName
- the directory name to extract
null
is returned if the directory to extract does
not exist or if content extraction is not supported.protected java.io.File getExtractFile(java.lang.String entryName)
public java.io.File getFile(java.lang.String entry, boolean nativeCode)
BundleFile
getFile
in class BundleFile
entry
- The path to the entry to locate a File for.nativeCode
- true if the path is native code.
public boolean containsDir(java.lang.String dir)
BundleFile
containsDir
in class BundleFile
dir
- The directory path to check existence of.
public BundleEntry getEntry(java.lang.String path)
BundleFile
getEntry
in class BundleFile
path
- path of the entry to locate in the bundle
public java.util.Enumeration getEntryPaths(java.lang.String path)
BundleFile
getEntryPaths
in class BundleFile
path
- path of the entry to locate in the bundle
public void close() throws java.io.IOException
BundleFile
close
in class BundleFile
java.io.IOException
- if any error occurs.public void open() throws java.io.IOException
BundleFile
open
in class BundleFile
java.io.IOException
- if any error occurs.public static void shutdown()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |