Module com.github.rvesse.airline
Interface ResourceLocator
-
- All Known Implementing Classes:
AbstractPlaceholderLocator
,ClasspathLocator
,EnvVarLocator
,FileLocator
,HomeDirectoryLocator
,JpmsResourceLocator
,JvmSystemPropertyLocator
,ModulePathLocator
,WorkingDirectoryLocator
public interface ResourceLocator
Interface for making resource search locations extensible e.g. supporting special paths like~/
to represent the home directory
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.io.InputStream
open(java.lang.String searchLocation, java.lang.String resourceName)
Opens a search location, potentially applying some resolution rules to that location
-
-
-
Method Detail
-
open
java.io.InputStream open(java.lang.String searchLocation, java.lang.String resourceName) throws java.io.IOException
Opens a search location, potentially applying some resolution rules to that locationIf the given
resourceName
exists in the search location then that resource should be returned. If that is not a valid resource but the search location itself is a valid resource then the locator should return that instead.- Parameters:
searchLocation
- Search locationresourceName
- Resource name expected in the search location- Returns:
- Input stream to read the search location or
null
if not a valid location - Throws:
java.io.IOException
- Thrown if there is a problem accessing the search location
-
-