Package nl.rrd.wool.utils
Interface ResourceLocator
-
- All Known Implementing Classes:
ClassLoaderResourceLocator
public interface ResourceLocatorInterface to locate and open resources. Implementations can locate resources for example from the file system, class loader or Android asset manager.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description InputStreamopenResource(String path)Opens the resource at the specified path.booleanresourceExists(String path)Returns whether the specified resource exists.
-
-
-
Method Detail
-
resourceExists
boolean resourceExists(String path)
Returns whether the specified resource exists.- Parameters:
path- the resource path- Returns:
- true if the resource exists, false otherwise
-
openResource
InputStream openResource(String path) throws IOException
Opens the resource at the specified path.- Parameters:
path- the resource path- Returns:
- the input stream
- Throws:
IOException- if the resource doesn't exist or can't be opened
-
-