Thanks for your nice answer.
  
  If I can not get a raw file path of a specific installed bundle but my  
purpose is to read a binary content of a specific bundle and store it  in a 
stream or an array of byte. My question now is that how I can get  a binary 
content of a specified installed bundle? For instance, I know  its BundleID, 
SymbolicName.  Can  getEntry,  findEntries  methods  help me? 
  
  Many thanks in advance.
  
  Lam.

Thomas Watson <[EMAIL PROTECTED]> wrote:    
The Framework implementation stores  the bundle content from an InputStream in 
an implementation specific way.   The OSGi specification does not specify that 
the bundle content must  be stored in a File format.  For example, the bundle 
content could  be stored in flash memory or a database or it could be 
transformed into  a VM specific format for optimization.  There is no OSGi API 
to get  to the raw File path of the bundle content installed.  
  
There are various methods on the Bundle  interface for getting bundle content 
entries (see getEntry, findEntries,  getEntryPaths and getResources).  

  Tom
    
  
  
      Duc Lam Vu <[EMAIL PROTECTED]>    
Sent by: [EMAIL PROTECTED]  05/13/2007 08:40 AM        Please respond to
  OSGi Developer Mail List <[email protected]>
  
  
        To
  OSGi Developer Mail List <[email protected]>      cc
                  
      Subject
  [osgi-dev] Install an OSGi Bundle from  a Jar file  
                      
  
    
  
  
  
Hi all, 
  
  I have got a content of a Jar file representing an OSGi bundle in a form  of 
an InputStream object via Network communication. I want to install this  Jar 
file by
  invoking BundleContext.Install(param1, InputStream stream. If I assign  
Param1 with a value of an arbitrary string then later on, when I try to  get a 
File path of the installed bundle by executing 
ServiceReference.getBundle.getLocation,  it returns me a value of the passed 
string. In fact, I want to get the  string that represents a real File path of 
the installed OSGi bundle. What  should I assign for the Param1 of the method 
BundleContext.Install.
  
  Any suggestion?
  
  Best Regards,
  Lam.     

---------------------------------
Don't get soaked. Take a  quick peak at the forecast 
  with theYahoo!  Search weather 
shortcut._______________________________________________
  OSGi Developer Mail List
  [email protected]
  http://www2.osgi.org/mailman/listinfo/osgi-dev  
_______________________________________________
OSGi Developer Mail List
[email protected]
http://www2.osgi.org/mailman/listinfo/osgi-dev


 
---------------------------------
Sucker-punch spam with award-winning protection.
 Try the free Yahoo! Mail Beta.
_______________________________________________
OSGi Developer Mail List
[email protected]
http://www2.osgi.org/mailman/listinfo/osgi-dev

Reply via email to