Class DirResourceLoader
java.lang.Object
com.tccc.kos.commons.util.resource.DirResourceLoader
- All Implemented Interfaces:
ResourceLoader
Loader that searches resources on the filesystem relative to a base directory.
- Since:
- 1.0
- Version:
- 2023-01-22
-
Constructor Summary
ConstructorsConstructorDescriptionDirResourceLoader
(File dir) Create a ResourceLoader that searchs relative to the specified base directory. -
Method Summary
Modifier and TypeMethodDescriptiongetResource
(String file) Return an input stream for the specified file.
-
Constructor Details
-
DirResourceLoader
Create a ResourceLoader that searchs relative to the specified base directory.- Parameters:
dir
- the base directory
-
-
Method Details
-
getResource
Description copied from interface:ResourceLoader
Return an input stream for the specified file.- Specified by:
getResource
in interfaceResourceLoader
- Parameters:
file
- the file to return an input stream for- Returns:
- the input stream or null
-