public abstract class AbstractFileLookup extends Object implements FileLookup
Constructor and Description |
---|
AbstractFileLookup() |
Modifier and Type | Method and Description |
---|---|
protected abstract InputStream |
getAsInputStreamFromClassLoader(String filename,
ClassLoader cl) |
protected abstract URL |
getAsURLFromClassLoader(String filename,
ClassLoader cl) |
protected abstract Collection<URL> |
getAsURLsFromClassLoader(String filename,
ClassLoader cl) |
InputStream |
lookupFile(String filename,
ClassLoader cl)
Looks up the file, see :
FileLookupFactory.DefaultFileLookup . |
URL |
lookupFileLocation(String filename,
ClassLoader cl) |
Collection<URL> |
lookupFileLocations(String filename,
ClassLoader cl) |
InputStream |
lookupFileStrict(String filename,
ClassLoader cl)
Looks up the file, see :
FileLookupFactory.DefaultFileLookup . |
InputStream |
lookupFileStrict(URI uri,
ClassLoader cl)
Looks up the file, see :
FileLookupFactory.DefaultFileLookup . |
public InputStream lookupFile(String filename, ClassLoader cl)
FileLookupFactory.DefaultFileLookup
.lookupFile
in interface FileLookup
filename
- might be the name of the file (too look it up in the class path) or an url to a file.protected abstract InputStream getAsInputStreamFromClassLoader(String filename, ClassLoader cl)
public InputStream lookupFileStrict(String filename, ClassLoader cl) throws FileNotFoundException
FileLookupFactory.DefaultFileLookup
.lookupFileStrict
in interface FileLookup
filename
- might be the name of the file (too look it up in the class path) or an url to a file.FileNotFoundException
- if file cannot be foundpublic InputStream lookupFileStrict(URI uri, ClassLoader cl) throws FileNotFoundException
FileLookup
FileLookupFactory.DefaultFileLookup
.lookupFileStrict
in interface FileLookup
uri
- An absolute, hierarchical URI with a scheme equal to
"file" that represents the file to lookupFileNotFoundException
- if file cannot be foundpublic URL lookupFileLocation(String filename, ClassLoader cl)
lookupFileLocation
in interface FileLookup
protected abstract URL getAsURLFromClassLoader(String filename, ClassLoader cl)
public Collection<URL> lookupFileLocations(String filename, ClassLoader cl) throws IOException
lookupFileLocations
in interface FileLookup
IOException
protected abstract Collection<URL> getAsURLsFromClassLoader(String filename, ClassLoader cl) throws IOException
IOException
Copyright © 2021 JBoss by Red Hat. All rights reserved.