|
||||||||||
| 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 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 |
|
ZipBundleFile(java.io.File basefile,
BaseData bundledata,
MRUBundleFileList mruList)
|
|
| 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. |
| Methods inherited from class org.eclipse.osgi.baseadaptor.bundlefile.BundleFile |
|---|
fixTrailingSlash, getBaseFile, getResourceURL, getResourceURL, getResourceURL, setPermissions, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected BaseData bundledata
protected volatile java.util.zip.ZipFile zipFile
protected volatile 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
public ZipBundleFile(java.io.File basefile,
BaseData bundledata,
MRUBundleFileList mruList)
throws java.io.IOException
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.IOExceptionprotected 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 BundleFileentry - 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 BundleFiledir - The directory path to check existence of.
public BundleEntry getEntry(java.lang.String path)
BundleFile
getEntry in class BundleFilepath - path of the entry to locate in the bundle
public java.util.Enumeration getEntryPaths(java.lang.String path)
BundleFile
getEntryPaths in class BundleFilepath - path of the entry to locate in the bundle
public void close()
throws java.io.IOException
BundleFile
close in class BundleFilejava.io.IOException - if any error occurs.public void open()
BundleFile
open in class BundleFile
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||