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) Looks up the file and returns its URLlookupFileLocations(String filename, ClassLoader cl) lookupFileLocationStrict(String filename, ClassLoader cl) Same asFileLookup.lookupFileLocation(String, ClassLoader)but throws aFileNotFoundExceptionif the file cannot be found.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
Description copied from interface:FileLookupLooks up the file and returns its URL- Specified by:
lookupFileLocationin interfaceFileLookup- Parameters:
filename-cl-- Returns:
- the URL pointing to the file, null if it cannot be found
-
lookupFileLocationStrict
Description copied from interface:FileLookupSame asFileLookup.lookupFileLocation(String, ClassLoader)but throws aFileNotFoundExceptionif the file cannot be found.- Specified by:
lookupFileLocationStrictin interfaceFileLookup- Parameters:
filename-cl-- Returns:
- Throws:
FileNotFoundException
-
getAsURLFromClassLoader
-
lookupFileLocations
- Specified by:
lookupFileLocationsin interfaceFileLookup- Throws:
IOException
-
getAsURLsFromClassLoader
protected abstract Collection<URL> getAsURLsFromClassLoader(String filename, ClassLoader cl) throws IOException - Throws:
IOException
-