Hi,
Your answer helps me a bit to understand the problem. However, I am still
confused. GetEntryPaths("/") only return all paths to entries that are direct
sub-folders of the root one. If I understand correctly then I have to traverse
recursively through these sub-folders to get an InputStream via
URL.openStream() to any specific file because I can not read content of one
directory. Later on, from the acquired InputStream, I can read content of the
file to a buffer and pass it to JarOutputstream. Can you correct my solution if
it is wrong?
Thank you in advance,
Best regards,
Lam.
Stuart McCulloch <[EMAIL PROTECTED]> wrote: On 16/05/07, Duc Lam Vu wrote:
> Hi,
>
> Stuart McCulloch wrote:
>
> you would normally install a bundle from an existing bundle context, ie:
>
> Bundle newBundle = bundleContext.installBundle(location, input);
>
> What should I assign for the "location" parameter? Any arbitrary value?
think of the "location" parameter as a unique key identifying the bundle
- as the javadoc for the installBundle method says:
"If a bundle containing the same location string is already installed,
the Bundle object for that bundle is returned"
this is true for both variants of the installBundle method (file and stream)
> Does the assigned value of this input parameter affect to value of an
> input parameter if the methods getEntryPaths or getEntry are invoked
> later on?
no - getEntryPaths() and getEntry() work relative to the bundle root "/"
regardless of the location string or where the bundle is actually located.
They also don't modify the contents, they just make the data accessible.
>
> Kind Regards,
> Lam.
>
>
> ________________________________
> Park yourself in front of a world of choices in alternative vehicles.
> Visit the Yahoo! Auto Green Center.
>
>
> _______________________________________________
> OSGi Developer Mail List
> [email protected]
> http://www2.osgi.org/mailman/listinfo/osgi-dev
>
--
Cheers, Stuart
_______________________________________________
OSGi Developer Mail List
[email protected]
http://www2.osgi.org/mailman/listinfo/osgi-dev
---------------------------------
Sick sense of humor? Visit Yahoo! TV's Comedy with an Edge to see what's on,
when. _______________________________________________
OSGi Developer Mail List
[email protected]
http://www2.osgi.org/mailman/listinfo/osgi-dev