|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.osgi.baseadaptor.bundlefile.BundleFile
public abstract class BundleFile
The BundleFile API is used by Adaptors to read resources out of an installed Bundle in the Framework.
Clients may extend this class.
Field Summary | |
---|---|
protected java.io.File |
basefile
The File object for this BundleFile. |
protected static java.lang.String |
PROP_SETPERMS_CMD
|
Constructor Summary | |
---|---|
BundleFile()
Default constructor |
|
BundleFile(java.io.File basefile)
BundleFile constructor |
Method Summary | |
---|---|
abstract void |
close()
Closes the BundleFile. |
abstract boolean |
containsDir(java.lang.String dir)
Determines if any BundleEntries exist in the given directory path. |
java.io.File |
getBaseFile()
Returns the base file for this BundleFile |
abstract BundleEntry |
getEntry(java.lang.String path)
Locates a file name in this bundle and returns a BundleEntry object |
abstract java.util.Enumeration |
getEntryPaths(java.lang.String path)
Allows to access the entries of the bundle. |
abstract java.io.File |
getFile(java.lang.String path,
boolean nativeCode)
Returns a File for the bundle entry specified by the path. |
java.net.URL |
getResourceURL(java.lang.String path,
long hostBundleID)
Returns a URL to access the contents of the entry specified by the path |
java.net.URL |
getResourceURL(java.lang.String path,
long hostBundleID,
int index)
Returns a URL to access the contents of the entry specified by the path |
abstract void |
open()
Opens the BundleFiles. |
static void |
setPermissions(java.io.File file)
Attempts to set the permissions of the file in a system dependant way. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final java.lang.String PROP_SETPERMS_CMD
protected java.io.File basefile
Constructor Detail |
---|
public BundleFile()
public BundleFile(java.io.File basefile)
basefile
- The File object where this BundleFile is
persistently stored.Method Detail |
---|
public abstract java.io.File getFile(java.lang.String path, boolean nativeCode)
path
- The path to the entry to locate a File for.nativeCode
- true if the path is native code.
public abstract BundleEntry getEntry(java.lang.String path)
path
- path of the entry to locate in the bundle
public abstract java.util.Enumeration getEntryPaths(java.lang.String path)
path
- path of the entry to locate in the bundle
public abstract void close() throws java.io.IOException
java.io.IOException
- if any error occurs.public abstract void open() throws java.io.IOException
java.io.IOException
- if any error occurs.public abstract boolean containsDir(java.lang.String dir)
dir
- The directory path to check existence of.
public java.net.URL getResourceURL(java.lang.String path, long hostBundleID)
path
- the path to the resourcehostBundleID
- the host bundle ID
public java.net.URL getResourceURL(java.lang.String path, long hostBundleID, int index)
path
- the path to the resourcehostBundleID
- the host bundle IDindex
- the resource index
public java.io.File getBaseFile()
public static void setPermissions(java.io.File file)
file
- the file to set the permissions on
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |