Package org.infinispan.commons.util
Interface FileLookup
-
- All Known Implementing Classes:
AbstractFileLookup,FileLookupFactory.DefaultFileLookup
public interface FileLookup
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description InputStreamlookupFile(String filename, ClassLoader cl)Looks up the file, see :FileLookupFactory.DefaultFileLookup.URLlookupFileLocation(String filename, ClassLoader cl)Collection<URL>lookupFileLocations(String filename, ClassLoader cl)InputStreamlookupFileStrict(String filename, ClassLoader cl)Looks up the file, see :FileLookupFactory.DefaultFileLookup.InputStreamlookupFileStrict(URI uri, ClassLoader cl)Looks up the file, see :FileLookupFactory.DefaultFileLookup.
-
-
-
Method Detail
-
lookupFile
InputStream lookupFile(String filename, ClassLoader cl)
Looks up the file, see :FileLookupFactory.DefaultFileLookup.- Parameters:
filename- might be the name of the file (too look it up in the class path) or an url to a file.- Returns:
- an input stream to the file or null if nothing found through all lookup steps.
-
lookupFileStrict
InputStream lookupFileStrict(String filename, ClassLoader cl) throws FileNotFoundException
Looks up the file, see :FileLookupFactory.DefaultFileLookup.- Parameters:
filename- might be the name of the file (too look it up in the class path) or an url to a file.- Returns:
- an input stream to the file or null if nothing found through all lookup steps.
- Throws:
FileNotFoundException- if file cannot be found
-
lookupFileStrict
InputStream lookupFileStrict(URI uri, ClassLoader cl) throws FileNotFoundException
Looks up the file, see :FileLookupFactory.DefaultFileLookup.- Parameters:
uri- An absolute, hierarchical URI with a scheme equal to "file" that represents the file to lookup- Returns:
- an input stream to the file or null if nothing found through all lookup steps.
- Throws:
FileNotFoundException- if file cannot be found
-
lookupFileLocation
URL lookupFileLocation(String filename, ClassLoader cl)
-
lookupFileLocations
Collection<URL> lookupFileLocations(String filename, ClassLoader cl) throws IOException
- Throws:
IOException
-
-