|
||||||||||
| 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 File |
basefile
The File object for this BundleFile. |
protected static String |
PROP_SETPERMS_CMD
|
| Constructor Summary | |
|---|---|
BundleFile()
Default constructor |
|
BundleFile(File basefile)
BundleFile constructor |
|
| Method Summary | |
|---|---|
abstract void |
close()
Closes the BundleFile. |
abstract boolean |
containsDir(String dir)
Determines if any BundleEntries exist in the given directory path. |
static String |
fixTrailingSlash(String path,
BundleEntry entry)
|
File |
getBaseFile()
Returns the base file for this BundleFile |
abstract BundleEntry |
getEntry(String path)
Locates a file name in this bundle and returns a BundleEntry object |
abstract Enumeration<String> |
getEntryPaths(String path)
Allows to access the entries of the bundle. |
abstract File |
getFile(String path,
boolean nativeCode)
Returns a File for the bundle entry specified by the path. |
URL |
getResourceURL(String path,
BaseData hostData,
int index)
Returns a URL to access the contents of the entry specified by the path |
URL |
getResourceURL(String path,
long hostBundleID)
Deprecated. use getResourceURL(String, BaseData, int) |
URL |
getResourceURL(String path,
long hostBundleID,
int index)
Deprecated. use getResourceURL(String, BaseData, int) |
abstract void |
open()
Opens the BundleFiles. |
static void |
setPermissions(File file)
Attempts to set the permissions of the file in a system dependent way. |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected static final String PROP_SETPERMS_CMD
protected File basefile
| Constructor Detail |
|---|
public BundleFile()
public BundleFile(File basefile)
basefile - The File object where this BundleFile is
persistently stored.| Method Detail |
|---|
public abstract File getFile(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(String path)
path - path of the entry to locate in the bundle
public abstract Enumeration<String> getEntryPaths(String path)
path - path of the entry to locate in the bundle
public abstract void close()
throws IOException
IOException - if any error occurs.
public abstract void open()
throws IOException
IOException - if any error occurs.public abstract boolean containsDir(String dir)
dir - The directory path to check existence of.
public URL getResourceURL(String path,
long hostBundleID)
getResourceURL(String, BaseData, int)
path - the path to the resourcehostBundleID - the host bundle ID
public URL getResourceURL(String path,
long hostBundleID,
int index)
getResourceURL(String, BaseData, int)
path - the path to the resourcehostBundleID - the host bundle IDindex - the resource index
public URL getResourceURL(String path,
BaseData hostData,
int index)
path - the path to the resourcehostData - the host BaseDataindex - the resource index
public File getBaseFile()
public static void setPermissions(File file)
file - the file to set the permissions onpublic String toString()
toString in class Object
public static String fixTrailingSlash(String path,
BundleEntry entry)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||