Skip to content

Latest commit

 

History

History
15 lines (9 loc) · 1.07 KB

File metadata and controls

15 lines (9 loc) · 1.07 KB

ResourceLoader

Original code was part of Slick2d done by Kevin Glass (http://www.cokeandcode.com)

The ResourceLoader allows reading of resources from different locations. By default it uses a ClasspathLocation and a FileSystemLocation. It will first check the ClasspathLocation and if the resource could not be found it will check the FileSystemLocation next.

Other Locations are easily possible by implementing the simple ResourceLocation interface. The order of the locations can be changed easily as well.

The ResourceLoader was used in several projects which made it suitable for a standalone project.

Example Usage

ResourceLoader loader = new ResourceLoader();
InputStream in = loader.getResourceAsStream("test.stuff");