org.apache.aries.application.utils.manifest
Class BundleManifest

java.lang.Object
  extended by org.apache.aries.application.utils.manifest.BundleManifest

public class BundleManifest
extends Object

Entity class to retrieve and represent a bundle manifest (valid or invalid).


Constructor Summary
BundleManifest(InputStream manifestIs)
          Create a BundleManifest object from the InputStream to the manifest (not to the bundle)
BundleManifest(Manifest m)
          Create a BundleManifest object from a common Manifest object
 
Method Summary
static BundleManifest fromBundle(File f)
          Retrieve a bundle manifest from the given jar file, which can be exploded or compressed
static BundleManifest fromBundle(IFile f)
          Retrieve a BundleManifest from the given jar file
static BundleManifest fromBundle(InputStream is)
          Read a manifest from a jar input stream.
 String getManifestVersion()
           
 Attributes getRawAttributes()
           
 Manifest getRawManifest()
           
 String getSymbolicName()
           
 org.osgi.framework.Version getVersion()
           
 boolean isValid()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BundleManifest

public BundleManifest(InputStream manifestIs)
               throws IOException
Create a BundleManifest object from the InputStream to the manifest (not to the bundle)

Parameters:
manifestIs -
Throws:
IOException

BundleManifest

public BundleManifest(Manifest m)
Create a BundleManifest object from a common Manifest object

Parameters:
m -
Method Detail

fromBundle

public static BundleManifest fromBundle(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 -
Returns:

fromBundle

public static BundleManifest fromBundle(IFile f)
Retrieve a BundleManifest from the given jar file

Parameters:
f -
Returns:

fromBundle

public static BundleManifest fromBundle(File f)
Retrieve a bundle manifest from the given jar file, which can be exploded or compressed

Parameters:
f -
Returns:

getSymbolicName

public String getSymbolicName()

getVersion

public org.osgi.framework.Version getVersion()

getManifestVersion

public String getManifestVersion()

getRawAttributes

public Attributes getRawAttributes()

getRawManifest

public Manifest getRawManifest()

isValid

public boolean isValid()


Copyright © 2009-2011 The Apache Software Foundation. All Rights Reserved.