org.infinispan.util
Class FileLookup
java.lang.Object
org.infinispan.util.FileLookup
public class FileLookup
- extends Object
Holds the logic of looking up a file, in the following sequence:
- try to load it with the current thread's
context ClassLoader
- if fails, the system ClassLoader
- if fails, try to load it as a file from the
disk
- Since:
- 4.0
- Author:
- Mircea.Markus@jboss.com
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FileLookup
public FileLookup()
lookupFile
public InputStream lookupFile(String filename)
- Looks up the file, see :
FileLookup
.
- 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
protected InputStream getAsInputStreamFromClassLoader(String filename)
lookupFileLocation
public URL lookupFileLocation(String filename)
Copyright © 2010 JBoss, a division of Red Hat. All Rights Reserved.