Class JarRevision
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
FieldsModifier and TypeFieldDescriptionprivate static final String
private static final int
private final File
private static final ThreadLocal
private final WeakZipFileFactory
private final WeakZipFileFactory.WeakZipFile
-
Constructor Summary
ConstructorsConstructorDescriptionJarRevision
(Logger logger, Map configMap, WeakZipFileFactory zipFactory, File revisionRootDir, String location, boolean byReference, InputStream is) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
close()
This method is called when the revision is no longer needed.private static void
getMainAttributes
(Map result, WeakZipFileFactory.WeakZipFile zipFile) Returns the main attributes of the JAR file manifest header of the revision.private void
initialize
(boolean byReference, InputStream is) Methods inherited from class org.apache.felix.framework.cache.BundleArchiveRevision
getConfig, getLocation, getLogger, getRevisionRootDir
-
Field Details
-
BUNDLE_JAR_FILE
- See Also:
-
m_zipFactory
-
m_bundleFile
-
m_zipFile
-
m_defaultBuffer
-
DEFAULT_BUFFER
private static final int DEFAULT_BUFFER- See Also:
-
-
Constructor Details
-
JarRevision
public JarRevision(Logger logger, Map configMap, WeakZipFileFactory zipFactory, File revisionRootDir, String location, boolean byReference, InputStream is) throws Exception - Throws:
Exception
-
-
Method Details
-
getManifestHeader
Description copied from class:BundleArchiveRevision
Returns the main attributes of the JAR file manifest header of the revision. The returned map is case insensitive.
- Specified by:
getManifestHeader
in classBundleArchiveRevision
- Returns:
- the case-insensitive JAR file manifest header of the revision.
- Throws:
Exception
- if any error occurs.
-
getContent
- Specified by:
getContent
in classBundleArchiveRevision
- Throws:
Exception
-
close
Description copied from class:BundleArchiveRevision
This 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:
close
in classBundleArchiveRevision
- Throws:
Exception
- if any error occurs.
-
initialize
- Throws:
Exception
-
getMainAttributes
private static void getMainAttributes(Map result, WeakZipFileFactory.WeakZipFile zipFile) throws Exception - Throws:
Exception
-