Package org.apache.aries.util.manifest
Class BundleManifest
- java.lang.Object
-
- org.apache.aries.util.manifest.BundleManifest
-
public class BundleManifest extends java.lang.Object
Entity class to retrieve and represent a bundle manifest (valid or invalid).
-
-
Constructor Summary
Constructors Constructor Description BundleManifest(java.io.InputStream manifestIs)
Create a BundleManifest object from the InputStream to the manifest (not to the bundle)BundleManifest(java.util.jar.Manifest m)
Create a BundleManifest object from a common Manifest object
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static BundleManifest
fromBundle(java.io.File f)
Retrieve a bundle manifest from the given jar file, which can be exploded or compressedstatic BundleManifest
fromBundle(java.io.InputStream is)
Read a manifest from a jar input stream.static BundleManifest
fromBundle(IFile f)
Retrieve a BundleManifest from the given jar filejava.lang.String
getManifestVersion()
java.util.jar.Attributes
getRawAttributes()
java.util.jar.Manifest
getRawManifest()
java.lang.String
getSymbolicName()
Version
getVersion()
boolean
isValid()
-
-
-
Constructor Detail
-
BundleManifest
public BundleManifest(java.io.InputStream manifestIs) throws java.io.IOException
Create a BundleManifest object from the InputStream to the manifest (not to the bundle)- Parameters:
manifestIs
-- Throws:
java.io.IOException
-
BundleManifest
public BundleManifest(java.util.jar.Manifest m)
Create a BundleManifest object from a common Manifest object- Parameters:
m
-
-
-
Method Detail
-
fromBundle
public static BundleManifest fromBundle(java.io.InputStream is)
Read a manifest from a jar input stream. This will find the manifest even if it is NOT the first file in the archive.- Parameters:
is
- the jar input stream- Returns:
- the bundle manifest
-
fromBundle
public static BundleManifest fromBundle(IFile f)
Retrieve a BundleManifest from the given jar file- Parameters:
f
- the bundle jar file- Returns:
- the bundle manifest
-
fromBundle
public static BundleManifest fromBundle(java.io.File f)
Retrieve a bundle manifest from the given jar file, which can be exploded or compressed- Parameters:
f
- the bundle jar file- Returns:
- the bundle manifest
-
getSymbolicName
public java.lang.String getSymbolicName()
-
getVersion
public Version getVersion()
-
getManifestVersion
public java.lang.String getManifestVersion()
-
getRawAttributes
public java.util.jar.Attributes getRawAttributes()
-
getRawManifest
public java.util.jar.Manifest getRawManifest()
-
isValid
public boolean isValid()
-
-