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 java.io.InputStreamlookupFile(java.lang.String filename, java.lang.ClassLoader cl)Looks up the file, see :FileLookupFactory.DefaultFileLookup.java.net.URLlookupFileLocation(java.lang.String filename, java.lang.ClassLoader cl)java.util.Collection<java.net.URL>lookupFileLocations(java.lang.String filename, java.lang.ClassLoader cl)java.io.InputStreamlookupFileStrict(java.lang.String filename, java.lang.ClassLoader cl)Looks up the file, see :FileLookupFactory.DefaultFileLookup.java.io.InputStreamlookupFileStrict(java.net.URI uri, java.lang.ClassLoader cl)Looks up the file, see :FileLookupFactory.DefaultFileLookup.
-
-
-
Method Detail
-
lookupFile
java.io.InputStream lookupFile(java.lang.String filename, java.lang.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
java.io.InputStream lookupFileStrict(java.lang.String filename, java.lang.ClassLoader cl) throws java.io.FileNotFoundExceptionLooks 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:
java.io.FileNotFoundException- if file cannot be found
-
lookupFileStrict
java.io.InputStream lookupFileStrict(java.net.URI uri, java.lang.ClassLoader cl) throws java.io.FileNotFoundExceptionLooks 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:
java.io.FileNotFoundException- if file cannot be found
-
lookupFileLocation
java.net.URL lookupFileLocation(java.lang.String filename, java.lang.ClassLoader cl)
-
lookupFileLocations
java.util.Collection<java.net.URL> lookupFileLocations(java.lang.String filename, java.lang.ClassLoader cl) throws java.io.IOException- Throws:
java.io.IOException
-
-