Definition at line 51 of file BundleArchive.java.
Public Member Functions | |
Hashtable | getLocalizationEntries (String localeFile) |
Gets all localization entries from this bundle. | |
HeaderDictionary | getUnlocalizedAttributes () |
| |
long | getBundleId () |
Get bundle identifier for this bundle archive. | |
String | getBundleLocation () |
Get bundle location for this bundle archive. | |
int | getStartLevel () |
Get stored bundle start level. | |
void | setStartLevel (int level) throws IOException |
Set stored bundle start level. | |
byte[] | getClassBytes (Integer sub, String component) throws IOException |
Get a byte array containg the contents of named file from a bundle archive. | |
Vector | componentExists (String component, boolean onlyFirst) |
Check if named entry exists in the bundle's classpath. | |
InputStream | getInputStream (String component, int ix) |
Get an specific InputStream to named entry inside a bundle. | |
String | getNativeLibrary (String libName) |
Extract native library from JAR. | |
boolean | getStartOnLaunchFlag () |
Get state of start-on-launch flag. | |
void | setStartOnLaunchFlag (boolean value) throws IOException |
Set state of start-on-launch flag. | |
void | purge () |
Remove bundle archive from persistent storage. | |
void | close () |
Close archive and all its open files. | |
List | getFailedClassPathEntries () |
Get a list with all classpath entries we failed to locate. | |
Enumeration | findResourcesPath (String path) |
Returns an Enumeration of all the paths (String objects) to entries within the bundle whose longest sub-path matches the supplied path argument. | |
String | getJarLocation () |
| |
Package Functions | |
String | getAttribute (String key) |
Get an attribute from the manifest of a bundle. |
String org.knopflerfish.framework.BundleArchive.getAttribute | ( | String | key | ) | [package] |
Get an attribute from the manifest of a bundle.
Not localized
key | Name of attribute to get. |
Implemented in org.knopflerfish.framework.bundlestorage.file.BundleArchiveImpl, and org.knopflerfish.framework.bundlestorage.memory.BundleArchiveImpl.
Referenced by org.knopflerfish.framework.BundleImpl.doExportImport().
Hashtable org.knopflerfish.framework.BundleArchive.getLocalizationEntries | ( | String | localeFile | ) |
Gets all localization entries from this bundle.
Will typically read the file OSGI-INF/bundle_<locale>.properties.
localeFile | Filename within archive for localization properties. |
Implemented in org.knopflerfish.framework.bundlestorage.file.BundleArchiveImpl, and org.knopflerfish.framework.bundlestorage.memory.BundleArchiveImpl.
Referenced by org.knopflerfish.framework.BundleClassLoader.getLocalizationEntries(), org.knopflerfish.framework.SystemBundle.readLocalization(), and org.knopflerfish.framework.BundleImpl.readLocalization().
long org.knopflerfish.framework.BundleArchive.getBundleId | ( | ) |
Get bundle identifier for this bundle archive.
Implemented in org.knopflerfish.framework.bundlestorage.file.BundleArchiveImpl, and org.knopflerfish.framework.bundlestorage.memory.BundleArchiveImpl.
Referenced by org.knopflerfish.framework.BundleImpl.BundleImpl(), org.knopflerfish.framework.BundleClassLoader.getBundleArchive(), org.knopflerfish.framework.bundlestorage.memory.BundleStorageImpl.removeArchive(), org.knopflerfish.framework.bundlestorage.file.BundleStorageImpl.removeArchive(), and org.knopflerfish.framework.BundleClassLoader.searchFor().
String org.knopflerfish.framework.BundleArchive.getBundleLocation | ( | ) |
Get bundle location for this bundle archive.
Implemented in org.knopflerfish.framework.bundlestorage.file.BundleArchiveImpl, and org.knopflerfish.framework.bundlestorage.memory.BundleArchiveImpl.
Referenced by org.knopflerfish.framework.BundleImpl.BundleImpl(), org.knopflerfish.framework.bundlestorage.memory.BundleStorageImpl.getStartOnLaunchBundles(), org.knopflerfish.framework.bundlestorage.file.BundleStorageImpl.getStartOnLaunchBundles(), and org.knopflerfish.framework.BundleClassLoader.purge().
byte [] org.knopflerfish.framework.BundleArchive.getClassBytes | ( | Integer | sub, | |
String | component | |||
) | throws IOException |
Get a byte array containg the contents of named file from a bundle archive.
Integer | From which sub archive to get. | |
component | File to get. |
IOException | if failed to read jar entry. |
Implemented in org.knopflerfish.framework.bundlestorage.file.BundleArchiveImpl, and org.knopflerfish.framework.bundlestorage.memory.BundleArchiveImpl.
Vector org.knopflerfish.framework.BundleArchive.componentExists | ( | String | component, | |
boolean | onlyFirst | |||
) |
Check if named entry exists in the bundle's classpath.
Leading '/' is stripped.
component | Entry to get reference to. | |
onlyFirst | End search when we find first entry if this is true. |
Implemented in org.knopflerfish.framework.bundlestorage.file.BundleArchiveImpl, and org.knopflerfish.framework.bundlestorage.memory.BundleArchiveImpl.
Referenced by org.knopflerfish.framework.BundleClassLoader.searchFor().
InputStream org.knopflerfish.framework.BundleArchive.getInputStream | ( | String | component, | |
int | ix | |||
) |
Get an specific InputStream to named entry inside a bundle.
Leading '/' is stripped.
component | Entry to get reference to. | |
ix | index of sub archives. A postive number is the classpath entry index. -1 means look in the main bundle. |
Implemented in org.knopflerfish.framework.bundlestorage.file.BundleArchiveImpl, and org.knopflerfish.framework.bundlestorage.memory.BundleArchiveImpl.
String org.knopflerfish.framework.BundleArchive.getNativeLibrary | ( | String | libName | ) |
Extract native library from JAR.
libName | Name of Jar file to get. |
Implemented in org.knopflerfish.framework.bundlestorage.file.BundleArchiveImpl, and org.knopflerfish.framework.bundlestorage.memory.BundleArchiveImpl.
Referenced by org.knopflerfish.framework.BundleClassLoader.findLibrary().
boolean org.knopflerfish.framework.BundleArchive.getStartOnLaunchFlag | ( | ) |
Get state of start-on-launch flag.
Implemented in org.knopflerfish.framework.bundlestorage.file.BundleArchiveImpl, and org.knopflerfish.framework.bundlestorage.memory.BundleArchiveImpl.
Referenced by org.knopflerfish.framework.bundlestorage.memory.BundleStorageImpl.getStartOnLaunchBundles(), and org.knopflerfish.framework.bundlestorage.file.BundleStorageImpl.getStartOnLaunchBundles().
void org.knopflerfish.framework.BundleArchive.setStartOnLaunchFlag | ( | boolean | value | ) | throws IOException |
Set state of start-on-launch flag.
value | Boolean value for start on launch flag. |
Implemented in org.knopflerfish.framework.bundlestorage.file.BundleArchiveImpl, and org.knopflerfish.framework.bundlestorage.memory.BundleArchiveImpl.
Referenced by org.knopflerfish.framework.BundleImpl.startOnLaunch().
List org.knopflerfish.framework.BundleArchive.getFailedClassPathEntries | ( | ) |
Get a list with all classpath entries we failed to locate.
Implemented in org.knopflerfish.framework.bundlestorage.file.BundleArchiveImpl, and org.knopflerfish.framework.bundlestorage.memory.BundleArchiveImpl.
Referenced by org.knopflerfish.framework.BundleImpl.getUpdatedState().
Enumeration org.knopflerfish.framework.BundleArchive.findResourcesPath | ( | String | path | ) |
Returns an Enumeration of all the paths (String
objects) to entries within the bundle whose longest sub-path matches the supplied path argument.
name |
Implemented in org.knopflerfish.framework.bundlestorage.file.BundleArchiveImpl, and org.knopflerfish.framework.bundlestorage.memory.BundleArchiveImpl.