Class ClassPathResourceLoader<S>
- java.lang.Object
-
- fr.ens.biologie.genomique.eoulsan.util.AbstractResourceLoader<S>
-
- fr.ens.biologie.genomique.eoulsan.util.ClassPathResourceLoader<S>
-
- Type Parameters:
S
- Type of the data to load
- All Implemented Interfaces:
ResourceLoader<S>
public abstract class ClassPathResourceLoader<S> extends AbstractResourceLoader<S>
This class allow to define a resource loader for resources in the class path.- Since:
- 2.0
- Author:
- Laurent Jourdren
-
-
Constructor Summary
Constructors Constructor Description ClassPathResourceLoader(Class<S> clazz, String resourcePath)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected InputStream
getResourceAsStream(String resourcePath)
Get the input stream related to a resource.void
reload()
Reload the list of available resources.-
Methods inherited from class fr.ens.biologie.genomique.eoulsan.util.AbstractResourceLoader
addResource, getResourceName, load, loadAllResources, loadResources
-
-
-
-
Method Detail
-
getResourceAsStream
protected InputStream getResourceAsStream(String resourcePath) throws IOException
Description copied from class:AbstractResourceLoader
Get the input stream related to a resource.- Specified by:
getResourceAsStream
in classAbstractResourceLoader<S>
- Parameters:
resourcePath
- resource path- Returns:
- a resource object
- Throws:
IOException
- if an error occurs while creating the input stream
-
reload
public void reload()
Description copied from interface:ResourceLoader
Reload the list of available resources.
-
-