java.lang.Object
cloud.piranha.resource.impl.MultiReleaseResource
- All Implemented Interfaces:
Resource
A resource wrapper that loads the versioned entries from META-INF/versions if
the resource contains a main attribute named "Multi-Release" in the
META-INF/MANIFEST.MF
A multi-release resource is a resource that contains a set of "base" entries and a set of "versioned" entries contained in subdirectories of "META-INF/versions" directory
The versioned entries are partitioned by the major version of the Java
release. A versioned entry, with a version n
, 8 < n
, in the
"META-INF/versions/{n}" directory overrides the base entry as well as any
entry with a version number i
where 8 < i < n
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionReturns all the locations for this resource.getName()
Get the name of this resourcegetResource
(String location) Get the resource.getResourceAsStream
(String location) Get the resource as a stream.toString()
-
Constructor Details
-
MultiReleaseResource
Constructor- Parameters:
resource
- the resource
-
-
Method Details
-
getResource
Description copied from interface:Resource
Get the resource.- Specified by:
getResource
in interfaceResource
- Parameters:
location
- the location.- Returns:
- the URL.
-
getResourceAsStream
Description copied from interface:Resource
Get the resource as a stream.- Specified by:
getResourceAsStream
in interfaceResource
- Parameters:
location
- the location.- Returns:
- the resource as a stream, or null if not found.
-
getAllLocations
Description copied from interface:Resource
Returns all the locations for this resource.- Specified by:
getAllLocations
in interfaceResource
- Returns:
- all the locations for this resource
-
getName
Description copied from interface:Resource
Get the name of this resource -
toString
-