Definition at line 62 of file file/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) throws IOException |
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 archive. | |
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, FileTree dir, InputStream is, String bundleLocation, long bundleId) throws Exception | |
Construct new bundle archive. | |
BundleArchiveImpl (BundleStorageImpl bundleStorage, FileTree dir, long bundleId) throws Exception | |
Construct new bundle archive based on saved data. | |
BundleArchiveImpl (BundleArchiveImpl old, InputStream is) throws Exception | |
Construct new bundle archive in an existing bundle archive. | |
Static Package Functions | |
static boolean | isUninstalled (File dir) |
Statically check if a directory contains info that a bundle is uninstalled. |
String org.knopflerfish.framework.bundlestorage.file.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 217 of file file/BundleArchiveImpl.java.
References org.knopflerfish.framework.bundlestorage.file.Archive.getAttribute().
long org.knopflerfish.framework.bundlestorage.file.BundleArchiveImpl.getBundleId | ( | ) |
Get bundle identifier for this bundle archive.
Implements org.knopflerfish.framework.BundleArchive.
Definition at line 254 of file file/BundleArchiveImpl.java.
String org.knopflerfish.framework.bundlestorage.file.BundleArchiveImpl.getBundleLocation | ( | ) |
Get bundle location for this bundle archive.
Implements org.knopflerfish.framework.BundleArchive.
Definition at line 264 of file file/BundleArchiveImpl.java.
byte [] org.knopflerfish.framework.bundlestorage.file.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 315 of file file/BundleArchiveImpl.java.
References org.knopflerfish.framework.bundlestorage.file.Archive.getClassBytes().
Vector org.knopflerfish.framework.bundlestorage.file.BundleArchiveImpl.componentExists | ( | String | component, | |
boolean | onlyFirst | |||
) |
Check if named entry exist in bundles archive.
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 328 of file file/BundleArchiveImpl.java.
References org.knopflerfish.framework.bundlestorage.file.Archive.getInputFlow().
InputStream org.knopflerfish.framework.bundlestorage.file.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 362 of file file/BundleArchiveImpl.java.
References org.knopflerfish.framework.bundlestorage.file.Archive.getInputFlow().
String org.knopflerfish.framework.bundlestorage.file.BundleArchiveImpl.getNativeLibrary | ( | String | libName | ) |
Get native library from JAR.
libName | Name of Jar file to get. |
Implements org.knopflerfish.framework.BundleArchive.
Definition at line 382 of file file/BundleArchiveImpl.java.
boolean org.knopflerfish.framework.bundlestorage.file.BundleArchiveImpl.getStartOnLaunchFlag | ( | ) |
Get state of start on launch flag.
Implements org.knopflerfish.framework.BundleArchive.
Definition at line 427 of file file/BundleArchiveImpl.java.
void org.knopflerfish.framework.bundlestorage.file.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 437 of file file/BundleArchiveImpl.java.
void org.knopflerfish.framework.bundlestorage.file.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 449 of file file/BundleArchiveImpl.java.
void org.knopflerfish.framework.bundlestorage.file.BundleArchiveImpl.close | ( | ) |
Close archive for further access.
It should still be possible to get attributes.
Implements org.knopflerfish.framework.BundleArchive.
Definition at line 470 of file file/BundleArchiveImpl.java.
List org.knopflerfish.framework.bundlestorage.file.BundleArchiveImpl.getFailedClassPathEntries | ( | ) |
Get a list with all classpath entries we failed to locate.
Implements org.knopflerfish.framework.BundleArchive.
Definition at line 483 of file file/BundleArchiveImpl.java.
static boolean org.knopflerfish.framework.bundlestorage.file.BundleArchiveImpl.isUninstalled | ( | File | dir | ) | [static, package] |
Statically check if a directory contains info that a bundle is uninstalled.
Uninstalled is marked via a startlevel of -2. If last modified file is not available then the bundle is not complete.
Definition at line 522 of file file/BundleArchiveImpl.java.
Enumeration org.knopflerfish.framework.bundlestorage.file.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 761 of file file/BundleArchiveImpl.java.