java.lang.Object
cloud.piranha.resource.PrefixJarResource
- All Implemented Interfaces:
Resource
The default PrefixJarResource.
- Author:
- Manfred Riem ([email protected])
-
Constructor Summary
ConstructorDescriptionConstructor.PrefixJarResource(JarFile jarFile, String prefix)
Constructor. -
Method Summary
Modifier and TypeMethodDescriptionReturns all the locations for this resource.Returns the JAR file.getName()
Get the name of this resourceReturns the prefix.getResource(String location)
Returns the resource.getResourceAsStream(String location)
Get the resource as a stream.void
setJarFile(JarFile jarFile)
Set the JAR file.void
Set the prefix.
-
Constructor Details
-
PrefixJarResource
public PrefixJarResource()Constructor. -
PrefixJarResource
Constructor.- Parameters:
jarFile
- the JAR file.prefix
- the prefix.
-
-
Method Details
-
getResource
Returns the resource.- Specified by:
getResource
in interfaceResource
- Parameters:
location
- the location.- Returns:
- the resource
-
getResourceAsStream
Get the resource as a stream.- Specified by:
getResourceAsStream
in interfaceResource
- Parameters:
location
- the resource location.- Returns:
- the input stream, or null if not found.
- See Also:
Resource.getResourceAsStream(java.lang.String)
-
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
-
getJarFile
Returns the JAR file.- Returns:
- the JAR file
-
getPrefix
Returns the prefix.- Returns:
- the prefix
-
setJarFile
Set the JAR file.- Parameters:
jarFile
- the JAR file.
-
setPrefix
Set the prefix.- Parameters:
prefix
- the prefix.
-
getName
Description copied from interface:Resource
Get the name of this resource
-