Definition at line 57 of file memory/BundleArchiveImpl.java.
Public Member Functions | |
String | getAttribute (String key) |
Get an attribute from the manifest of a bundle. | |
Hashtable | getLocalizationEntries (String localeFile) |
returns the localization entries of this archive. | |
HeaderDictionary | getUnlocalizedAttributes () |
returns the raw unlocalized entries of this archive. | |
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) |
Set stored bundle start level. | |
byte[] | getClassBytes (Integer sub, String path) 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 exist in bundles classpath. | |
InputStream | getInputStream (String component, int ix) |
Get an specific InputStream to named entry inside a bundle. | |
String | getNativeLibrary (String libName) |
Get 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 for further access. | |
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 | |
BundleArchiveImpl (BundleStorageImpl bundleStorage, InputStream is, String bundleLocation, long bundleId) throws Exception | |
Construct new bundle archive. | |
BundleArchiveImpl (BundleArchiveImpl old, InputStream is) throws Exception | |
Construct new bundle archive in an existing bundle archive. |
String org.knopflerfish.framework.bundlestorage.memory.BundleArchiveImpl.getAttribute | ( | String | key | ) |
Get an attribute from the manifest of a bundle.
key | Name of attribute to get. |
Implements org.knopflerfish.framework.BundleArchive.
Definition at line 120 of file memory/BundleArchiveImpl.java.
References org.knopflerfish.framework.bundlestorage.memory.Archive.getAttribute().
long org.knopflerfish.framework.bundlestorage.memory.BundleArchiveImpl.getBundleId | ( | ) |
Get bundle identifier for this bundle archive.
Implements org.knopflerfish.framework.BundleArchive.
Definition at line 158 of file memory/BundleArchiveImpl.java.
String org.knopflerfish.framework.bundlestorage.memory.BundleArchiveImpl.getBundleLocation | ( | ) |
Get bundle location for this bundle archive.
Implements org.knopflerfish.framework.BundleArchive.
Definition at line 167 of file memory/BundleArchiveImpl.java.
byte [] org.knopflerfish.framework.bundlestorage.memory.BundleArchiveImpl.getClassBytes | ( | Integer | sub, | |
String | path | |||
) | throws IOException |
Get a byte array containg the contents of named file from a bundle archive.
sub | index of jar, 0 means the top level. | |
path | Path to class file. |
IOException | if failed to read jar entry. |
Implements org.knopflerfish.framework.BundleArchive.
Definition at line 211 of file memory/BundleArchiveImpl.java.
References org.knopflerfish.framework.bundlestorage.memory.Archive.getClassBytes().
Vector org.knopflerfish.framework.bundlestorage.memory.BundleArchiveImpl.componentExists | ( | String | component, | |
boolean | onlyFirst | |||
) |
Check if named entry exist in bundles classpath.
Leading '/' is stripped.
component | Entry to get reference to. | |
onlyFirst | End search when we find first entry if this is true. |
Implements org.knopflerfish.framework.BundleArchive.
Definition at line 224 of file memory/BundleArchiveImpl.java.
References org.knopflerfish.framework.bundlestorage.memory.Archive.getInputStream().
InputStream org.knopflerfish.framework.bundlestorage.memory.BundleArchiveImpl.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. |
Implements org.knopflerfish.framework.BundleArchive.
Definition at line 257 of file memory/BundleArchiveImpl.java.
References org.knopflerfish.framework.bundlestorage.memory.Archive.getInputStream().
String org.knopflerfish.framework.bundlestorage.memory.BundleArchiveImpl.getNativeLibrary | ( | String | libName | ) |
Get native library from JAR.
libName | Name of Jar file to get. |
Implements org.knopflerfish.framework.BundleArchive.
Definition at line 276 of file memory/BundleArchiveImpl.java.
boolean org.knopflerfish.framework.bundlestorage.memory.BundleArchiveImpl.getStartOnLaunchFlag | ( | ) |
Get state of start on launch flag.
Implements org.knopflerfish.framework.BundleArchive.
Definition at line 286 of file memory/BundleArchiveImpl.java.
void org.knopflerfish.framework.bundlestorage.memory.BundleArchiveImpl.setStartOnLaunchFlag | ( | boolean | value | ) | throws IOException |
Set state of start on launch flag.
value | Boolean value for start on launch flag. |
Implements org.knopflerfish.framework.BundleArchive.
Definition at line 296 of file memory/BundleArchiveImpl.java.
void org.knopflerfish.framework.bundlestorage.memory.BundleArchiveImpl.purge | ( | ) |
Remove bundle archive from persistent storage.
If we removed the active revision also remove bundle status files.
Implements org.knopflerfish.framework.BundleArchive.
Definition at line 307 of file memory/BundleArchiveImpl.java.
References org.knopflerfish.framework.bundlestorage.memory.BundleStorageImpl.removeArchive().
void org.knopflerfish.framework.bundlestorage.memory.BundleArchiveImpl.close | ( | ) |
Close archive for further access.
It should still be possible to get attributes.
Implements org.knopflerfish.framework.BundleArchive.
Definition at line 316 of file memory/BundleArchiveImpl.java.
List org.knopflerfish.framework.bundlestorage.memory.BundleArchiveImpl.getFailedClassPathEntries | ( | ) |
Get a list with all classpath entries we failed to locate.
Implements org.knopflerfish.framework.BundleArchive.
Definition at line 325 of file memory/BundleArchiveImpl.java.
Enumeration org.knopflerfish.framework.bundlestorage.memory.BundleArchiveImpl.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 |
Implements org.knopflerfish.framework.BundleArchive.
Definition at line 369 of file memory/BundleArchiveImpl.java.
References org.knopflerfish.framework.bundlestorage.memory.Archive.findResourcesPath().