Package org.osgi.test.common.install
Class BundleInstaller.EmbeddedLocation
java.lang.Object
org.osgi.test.common.install.BundleInstaller.EmbeddedLocation
- Enclosing class:
- BundleInstaller
EmbeddedLocation describes a Location of a File inside a Bundle.
-
Method Summary
Modifier and TypeMethodDescriptionbooleangetURL(org.osgi.framework.BundleContext bc) inthashCode()Creates an EmbeddedLocation by the pure parameters.Creates an EmbeddedLocation by the spec.of(org.osgi.framework.BundleContext bundleContext, Optional<String> oBundleSymbolicName, Optional<String> oBundleVersion, Optional<String> oPath, String file) Creates an EmbeddedLocation by the given parameters.openStream(org.osgi.framework.BundleContext bc) toString()
-
Method Details
-
of
public static BundleInstaller.EmbeddedLocation of(org.osgi.framework.BundleContext bundleContext, Optional<String> oBundleSymbolicName, Optional<String> oBundleVersion, Optional<String> oPath, String file) Creates an EmbeddedLocation by the given parameters. Existence of File is tested at creation time.- Parameters:
bundleContext- - if null it searches the file in the root of the BundelContexts bundle.oBundleSymbolicName- s- ymbolicName of the bundle that embedded the file must not be nulloBundleVersion- - version of the bundle that embedded the file -oPath- - the optional path in the jarfile- - the filename must not be null- Returns:
- EmbeddedLocation
-
of
public static BundleInstaller.EmbeddedLocation of(org.osgi.framework.BundleContext bundleContext, String spec) throws IllegalArgumentException Creates an EmbeddedLocation by the spec. Existence of File is tested at creation time.- Parameters:
bundleContext-spec- 'bundle.symbolic.name:1.2.3:/path/file.jar'In minimum 'file.jar' must be used. Then it searches the file in the root of the BundelContexts bundle.
- Returns:
- EmbeddedLocation
- Throws:
IllegalArgumentException
-
of
public static BundleInstaller.EmbeddedLocation of(String bundleSymbolicName, org.osgi.framework.Version bundleVersion, String path, String file) Creates an EmbeddedLocation by the pure parameters. existence of File not tested at creation time.- Parameters:
bundleSymbolicName- - symbolicName of the bundle that embedded the file must not be nullbundleVersion- - version of the bundle that embedded the file - must not be nullpath- - the path in the jar - must not be nullfile- - the filename must not be null- Returns:
- EmbeddedLocation
-
equals
-
hashCode
public int hashCode() -
openStream
- Throws:
IOException
-
getURL
- Throws:
IOException
-
toString
-