|
||||||||||
| 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. |
static java.lang.String |
fixTrailingSlash(java.lang.String path,
BundleEntry entry)
|
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<java.lang.String> |
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,
BaseData hostData,
int index)
Returns a URL to access the contents of the entry specified by the path |
java.net.URL |
getResourceURL(java.lang.String path,
long hostBundleID)
Deprecated. use getResourceURL(String, BaseData, int) |
java.net.URL |
getResourceURL(java.lang.String path,
long hostBundleID,
int index)
Deprecated. use getResourceURL(String, BaseData, int) |
abstract void |
open()
Opens the BundleFiles. |
static void |
setPermissions(java.io.File file)
Attempts to set the permissions of the file in a system dependent way. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, 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<java.lang.String> 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)
getResourceURL(String, BaseData, int)
path - the path to the resourcehostBundleID - the host bundle ID
public java.net.URL getResourceURL(java.lang.String path,
long hostBundleID,
int index)
getResourceURL(String, BaseData, int)
path - the path to the resourcehostBundleID - the host bundle IDindex - the resource index
public java.net.URL getResourceURL(java.lang.String path,
BaseData hostData,
int index)
path - the path to the resourcehostData - the host BaseDataindex - the resource index
public java.io.File getBaseFile()
public static void setPermissions(java.io.File file)
file - the file to set the permissions onpublic java.lang.String toString()
toString in class java.lang.Object
public static java.lang.String fixTrailingSlash(java.lang.String path,
BundleEntry entry)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||