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 Stringprivate static final intprivate final Fileprivate static final ThreadLocalprivate final WeakZipFileFactoryprivate 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 voidclose()This method is called when the revision is no longer needed.private static voidgetMainAttributes(Map result, WeakZipFileFactory.WeakZipFile zipFile) Returns the main attributes of the JAR file manifest header of the revision.private voidinitialize(boolean byReference, InputStream is) Methods inherited from class 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: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:
Exception- if any error occurs.
-
getContent
- Specified by:
getContentin classBundleArchiveRevision- Throws:
Exception
-
close
Description 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:
Exception- if any error occurs.
-
initialize
- Throws:
Exception
-
getMainAttributes
private static void getMainAttributes(Map result, WeakZipFileFactory.WeakZipFile zipFile) throws Exception - Throws:
Exception
-