Package net.targetr.wtm3.io.loader
Interface ResourceLoader
- All Known Implementing Classes:
ClassPathResourceLoader,SpeedTestResourceLoader,ZipFileResourceLoader
public interface ResourceLoader
Opens streams for resources from a backing source or generated content.
-
Method Summary
Modifier and TypeMethodDescriptionReturns the resource source.openInputStream(String path) Opens a resource stream.
-
Method Details
-
getSource
String getSource()Returns the resource source.- Returns:
- a string representing the source resources are loaded from
-
openInputStream
Opens a resource stream. The caller is responsible for closing the returned stream.- Parameters:
path- the resource path understood by this loader- Returns:
- a stream containing the resource data, or null if the resource is not found
- Throws:
IOException- if opening or reading the resource fails
-