Definition at line 57 of file file/Archive.java.
Public Member Functions | |
String | toString () |
Show file name for archive, if zip show if it is sub archive. | |
Package Functions | |
Archive (File dir, int rev, InputStream is) throws IOException | |
Create an Archive based on contents of an InputStream, the archive is saved as local copy in the specified directory. | |
boolean | isSkipped (String pathName) |
Return true if the specified path name should be skipped when unpacking. | |
Archive (File dir, int rev, String location) throws IOException | |
Create an Archive based on contents of a saved archive in the specified directory. | |
Archive (Archive a, String path) throws IOException | |
Create a Sub-Archive based on a path to in an already existing Archive. | |
int | getRevision () |
Get revision number this archive. | |
String | getAttribute (String key) |
Get an attribute from the manifest of the archive. | |
byte[] | getClassBytes (String classFile) throws IOException |
Get a byte array containg the contents of named class file from the archive. | |
InputFlow | getInputFlow (String component) |
Get an InputFlow to named entry inside an Archive. | |
Archive | getSubArchive (String path) throws IOException |
Get an Archive handle to a named Jar file within this archive. | |
String | getNativeLibrary (String path) throws IOException |
Extract native library from JAR. | |
void | purge () |
Remove archive and any unpacked sub-archives. | |
void | close () |
Close archive and all open sub-archives. | |
String | getPath () |
Returns the path to this bundle. | |
Package Attributes | |
boolean | bReference = new Boolean(System.getProperty("org.knopflerfish.framework.bundlestorage.file.reference", "false")).booleanValue() |
Controls if file: URLs should be referenced only, not copied to bundle storage dir. | |
Manifest | manifest |
Archive's manifest. | |
Classes | |
class | InputFlow |
InputFlow represents an InputStream with a known length. More... |
org.knopflerfish.framework.bundlestorage.file.Archive.Archive | ( | File | dir, | |
int | rev, | |||
InputStream | is | |||
) | throws IOException [package] |
Create an Archive based on contents of an InputStream, the archive is saved as local copy in the specified directory.
dir | Directory to save data in. | |
rev | Revision of bundle content (used for updates). | |
is | Jar file data in an InputStream. | |
url | URL to use to CodeSource. |
Definition at line 122 of file file/Archive.java.
Referenced by org.knopflerfish.framework.bundlestorage.file.Archive.getSubArchive().
org.knopflerfish.framework.bundlestorage.file.Archive.Archive | ( | File | dir, | |
int | rev, | |||
String | location | |||
) | throws IOException [package] |
Create an Archive based on contents of a saved archive in the specified directory.
Take lowest versioned archive and remove rest.
Definition at line 236 of file file/Archive.java.
References org.knopflerfish.framework.bundlestorage.file.Archive.bReference, and org.knopflerfish.framework.bundlestorage.file.Archive.manifest.
org.knopflerfish.framework.bundlestorage.file.Archive.Archive | ( | Archive | a, | |
String | path | |||
) | throws IOException [package] |
Create a Sub-Archive based on a path to in an already existing Archive.
The new archive is saved in a subdirectory below local copy of the existing Archive.
FileNotFoundException | if no such Jar file in archive. | |
IOException | if failed to read Jar file. |
Definition at line 310 of file file/Archive.java.
String org.knopflerfish.framework.bundlestorage.file.Archive.toString | ( | ) |
Show file name for archive, if zip show if it is sub archive.
Definition at line 338 of file file/Archive.java.
int org.knopflerfish.framework.bundlestorage.file.Archive.getRevision | ( | ) | [package] |
Get revision number this archive.
Definition at line 352 of file file/Archive.java.
String org.knopflerfish.framework.bundlestorage.file.Archive.getAttribute | ( | String | key | ) | [package] |
Get an attribute from the manifest of the archive.
key | Name of attribute to get. |
Definition at line 368 of file file/Archive.java.
References org.knopflerfish.framework.bundlestorage.file.Archive.manifest.
Referenced by org.knopflerfish.framework.bundlestorage.file.BundleArchiveImpl.getAttribute().
byte [] org.knopflerfish.framework.bundlestorage.file.Archive.getClassBytes | ( | String | classFile | ) | throws IOException [package] |
Get a byte array containg the contents of named class file from the archive.
Class | File to get. |
IOException | if failed to read jar entry. |
Definition at line 385 of file file/Archive.java.
References org.knopflerfish.framework.bundlestorage.file.Archive.getInputFlow(), org.knopflerfish.framework.bundlestorage.file.Archive.InputFlow.is, and org.knopflerfish.framework.bundlestorage.file.Archive.InputFlow.length.
Referenced by org.knopflerfish.framework.bundlestorage.file.BundleArchiveImpl.getClassBytes().
InputFlow org.knopflerfish.framework.bundlestorage.file.Archive.getInputFlow | ( | String | component | ) | [package] |
Get an InputFlow to named entry inside an Archive.
component | Entry to get reference to. |
Definition at line 427 of file file/Archive.java.
Referenced by org.knopflerfish.framework.bundlestorage.file.BundleArchiveImpl.componentExists(), org.knopflerfish.framework.bundlestorage.file.Archive.getClassBytes(), org.knopflerfish.framework.bundlestorage.file.BundleArchiveImpl.getInputStream(), and org.knopflerfish.framework.bundlestorage.file.BundleArchiveImpl.getLocalizationEntries().
Archive org.knopflerfish.framework.bundlestorage.file.Archive.getSubArchive | ( | String | path | ) | throws IOException [package] |
Get an Archive handle to a named Jar file within this archive.
path | Name of Jar file to get. |
FileNotFoundException | if no such Jar file in archive. | |
IOException | if failed to read Jar file. |
Definition at line 535 of file file/Archive.java.
References org.knopflerfish.framework.bundlestorage.file.Archive.Archive().
String org.knopflerfish.framework.bundlestorage.file.Archive.getNativeLibrary | ( | String | path | ) | throws IOException [package] |
Extract native library from JAR.
key | Name of Jar file to get. |
Definition at line 549 of file file/Archive.java.
void org.knopflerfish.framework.bundlestorage.file.Archive.close | ( | ) | [package] |
Close archive and all open sub-archives.
If close fails it is silently ignored.
Definition at line 611 of file file/Archive.java.
Referenced by org.knopflerfish.framework.bundlestorage.file.Archive.purge().