Class JarRevision
- java.lang.Object
-
- org.apache.felix.framework.cache.BundleArchiveRevision
-
- org.apache.felix.framework.cache.JarRevision
-
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.
-
-
Field Summary
Fields Modifier and Type Field Description private static java.lang.StringBUNDLE_JAR_FILEprivate static intDEFAULT_BUFFERprivate java.io.Filem_bundleFileprivate static java.lang.ThreadLocalm_defaultBufferprivate WeakZipFileFactorym_zipFactoryprivate WeakZipFileFactory.WeakZipFilem_zipFile
-
Constructor Summary
Constructors Constructor Description JarRevision(Logger logger, java.util.Map configMap, WeakZipFileFactory zipFactory, java.io.File revisionRootDir, java.lang.String location, boolean byReference, java.io.InputStream is)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidclose()This method is called when the revision is no longer needed.ContentgetContent()private static voidgetMainAttributes(java.util.Map result, WeakZipFileFactory.WeakZipFile zipFile)java.util.MapgetManifestHeader()Returns the main attributes of the JAR file manifest header of the revision.private voidinitialize(boolean byReference, java.io.InputStream is)-
Methods inherited from class org.apache.felix.framework.cache.BundleArchiveRevision
getConfig, getLocation, getLogger, getRevisionRootDir
-
-
-
-
Field Detail
-
BUNDLE_JAR_FILE
private static final transient java.lang.String BUNDLE_JAR_FILE
- See Also:
- Constant Field Values
-
m_zipFactory
private final WeakZipFileFactory m_zipFactory
-
m_bundleFile
private final java.io.File m_bundleFile
-
m_zipFile
private final WeakZipFileFactory.WeakZipFile m_zipFile
-
m_defaultBuffer
private static final java.lang.ThreadLocal m_defaultBuffer
-
DEFAULT_BUFFER
private static final int DEFAULT_BUFFER
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
JarRevision
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
- Throws:
java.lang.Exception
-
-
Method Detail
-
getManifestHeader
public java.util.Map getManifestHeader() throws java.lang.ExceptionDescription copied from class:BundleArchiveRevisionReturns the main attributes of the JAR file manifest header of the revision. The returned map is case insensitive.
- Specified by:
getManifestHeaderin classBundleArchiveRevision- Returns:
- the case-insensitive JAR file manifest header of the revision.
- Throws:
java.lang.Exception- if any error occurs.
-
getContent
public Content getContent() throws java.lang.Exception
- Specified by:
getContentin classBundleArchiveRevision- Throws:
java.lang.Exception
-
close
protected void close() throws java.lang.ExceptionDescription copied from class: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.
- Specified by:
closein classBundleArchiveRevision- Throws:
java.lang.Exception- if any error occurs.
-
initialize
private void initialize(boolean byReference, java.io.InputStream is) throws java.lang.Exception- Throws:
java.lang.Exception
-
getMainAttributes
private static void getMainAttributes(java.util.Map result, WeakZipFileFactory.WeakZipFile zipFile) throws java.lang.Exception- Throws:
java.lang.Exception
-
-