class JarRevision extends BundleArchiveRevision
This class implements a bundle archive revision for a standard bundle JAR file. The specified location is the URL of the JAR file. By default, the associated JAR file is copied into the revision's directory on the file system, but it is possible to mark the JAR as 'by reference', which will result in the bundle JAR be used 'in place' and not being copied. In either case, some of the contents may be extracted into the revision directory, such as embedded JAR files and native libraries.
| Modifier and Type | Field and Description |
|---|---|
private static java.lang.String |
BUNDLE_JAR_FILE |
private static int |
DEFAULT_BUFFER |
private java.io.File |
m_bundleFile |
private static java.lang.ThreadLocal |
m_defaultBuffer |
private WeakZipFileFactory |
m_zipFactory |
private WeakZipFileFactory.WeakZipFile |
m_zipFile |
| Constructor and Description |
|---|
JarRevision(Logger logger,
java.util.Map configMap,
WeakZipFileFactory zipFactory,
java.io.File revisionRootDir,
java.lang.String location,
boolean byReference,
java.io.InputStream is) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
close()
This method is called when the revision is no longer needed.
|
Content |
getContent() |
private static void |
getMainAttributes(java.util.Map result,
WeakZipFileFactory.WeakZipFile zipFile) |
java.util.Map |
getManifestHeader()
Returns the main attributes of the JAR file manifest header of the
revision.
|
private void |
initialize(boolean byReference,
java.io.InputStream is) |
getConfig, getLocation, getLogger, getRevisionRootDirprivate static final transient java.lang.String BUNDLE_JAR_FILE
private final WeakZipFileFactory m_zipFactory
private final java.io.File m_bundleFile
private final WeakZipFileFactory.WeakZipFile m_zipFile
private static final java.lang.ThreadLocal m_defaultBuffer
private static final int DEFAULT_BUFFER
public JarRevision(Logger logger, java.util.Map configMap, WeakZipFileFactory zipFactory, java.io.File revisionRootDir, java.lang.String location, boolean byReference, java.io.InputStream is) throws java.lang.Exception
java.lang.Exceptionpublic java.util.Map getManifestHeader()
throws java.lang.Exception
BundleArchiveRevisionReturns the main attributes of the JAR file manifest header of the revision. The returned map is case insensitive.
getManifestHeader in class BundleArchiveRevisionjava.lang.Exception - if any error occurs.public Content getContent() throws java.lang.Exception
getContent in class BundleArchiveRevisionjava.lang.Exceptionprotected void close()
throws java.lang.Exception
BundleArchiveRevisionThis method is called when the revision is no longer needed. The directory associated with the revision will automatically be removed for each revision, so this method only needs to be concerned with other issues, such as open files.
close in class BundleArchiveRevisionjava.lang.Exception - if any error occurs.private void initialize(boolean byReference,
java.io.InputStream is)
throws java.lang.Exception
java.lang.Exceptionprivate static void getMainAttributes(java.util.Map result,
WeakZipFileFactory.WeakZipFile zipFile)
throws java.lang.Exception
java.lang.Exception