- All Known Implementing Classes:
AliasedDirectoryResource
,AliasedNamedResource
,ByteArrayResource
,ClassResource
,DirectoryResource
,JarResource
,MultiReleaseResource
,PrefixJarResource
,ShrinkWrapResource
,StringResource
public interface Resource
The Resource API.
- Author:
- Manfred Riem ([email protected])
-
Method Summary
Modifier and TypeMethodDescriptionReturns all the locations for this resource.default String
getName()
Get the name of this resourcegetResource
(String location) Get the resource.getResourceAsStream
(String location) Get the resource as a stream.
-
Method Details
-
getResource
Get the resource.- Parameters:
location
- the location.- Returns:
- the URL.
-
getResourceAsStream
Get the resource as a stream.- Parameters:
location
- the location.- Returns:
- the resource as a stream, or null if not found.
-
getAllLocations
Returns all the locations for this resource.- Returns:
- all the locations for this resource
-
getName
Get the name of this resource- Returns:
- the name
-