Package org.infinispan.commons.util
Class AbstractFileLookup
java.lang.Object
org.infinispan.commons.util.AbstractFileLookup
- All Implemented Interfaces:
FileLookup
- Direct Known Subclasses:
FileLookupFactory.DefaultFileLookup
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract InputStreamgetAsInputStreamFromClassLoader(String filename, ClassLoader cl) protected abstract URLgetAsURLFromClassLoader(String filename, ClassLoader cl) protected abstract Collection<URL>getAsURLsFromClassLoader(String filename, ClassLoader cl) lookupFile(String filename, ClassLoader cl) Looks up the file, see :FileLookupFactory.DefaultFileLookup.lookupFileLocation(String filename, ClassLoader cl) lookupFileLocations(String filename, ClassLoader cl) lookupFileStrict(String filename, ClassLoader cl) Looks up the file, see :FileLookupFactory.DefaultFileLookup.lookupFileStrict(URI uri, ClassLoader cl) Looks up the file, see :FileLookupFactory.DefaultFileLookup.
-
Constructor Details
-
AbstractFileLookup
public AbstractFileLookup()
-
-
Method Details
-
lookupFile
Looks up the file, see :FileLookupFactory.DefaultFileLookup.- Specified by:
lookupFilein interfaceFileLookup- 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.
-
getAsInputStreamFromClassLoader
-
lookupFileStrict
Looks up the file, see :FileLookupFactory.DefaultFileLookup.- Specified by:
lookupFileStrictin interfaceFileLookup- 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
Description copied from interface:FileLookupLooks up the file, see :FileLookupFactory.DefaultFileLookup.- Specified by:
lookupFileStrictin interfaceFileLookup- 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
- Specified by:
lookupFileLocationin interfaceFileLookup
-
getAsURLFromClassLoader
-
lookupFileLocations
- Specified by:
lookupFileLocationsin interfaceFileLookup- Throws:
IOException
-
getAsURLsFromClassLoader
protected abstract Collection<URL> getAsURLsFromClassLoader(String filename, ClassLoader cl) throws IOException - Throws:
IOException
-