Class AbstractFileLookup

    • Constructor Detail

      • AbstractFileLookup

        public AbstractFileLookup()
    • Method Detail

      • lookupFile

        public java.io.InputStream lookupFile​(java.lang.String filename,
                                              java.lang.ClassLoader cl)
        Looks up the file, see : FileLookupFactory.DefaultFileLookup.
        Specified by:
        lookupFile in interface 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 abstract java.io.InputStream getAsInputStreamFromClassLoader​(java.lang.String filename,
                                                                               java.lang.ClassLoader cl)
      • lookupFileStrict

        public java.io.InputStream lookupFileStrict​(java.lang.String filename,
                                                    java.lang.ClassLoader cl)
                                             throws java.io.FileNotFoundException
        Looks up the file, see : FileLookupFactory.DefaultFileLookup.
        Specified by:
        lookupFileStrict in interface 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.
        Throws:
        java.io.FileNotFoundException - if file cannot be found
      • lookupFileStrict

        public java.io.InputStream lookupFileStrict​(java.net.URI uri,
                                                    java.lang.ClassLoader cl)
                                             throws java.io.FileNotFoundException
        Description copied from interface: FileLookup
        Looks up the file, see : FileLookupFactory.DefaultFileLookup.
        Specified by:
        lookupFileStrict in interface FileLookup
        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

        public java.net.URL lookupFileLocation​(java.lang.String filename,
                                               java.lang.ClassLoader cl)
        Specified by:
        lookupFileLocation in interface FileLookup
      • getAsURLFromClassLoader

        protected abstract java.net.URL getAsURLFromClassLoader​(java.lang.String filename,
                                                                java.lang.ClassLoader cl)
      • lookupFileLocations

        public java.util.Collection<java.net.URL> lookupFileLocations​(java.lang.String filename,
                                                                      java.lang.ClassLoader cl)
                                                               throws java.io.IOException
        Specified by:
        lookupFileLocations in interface FileLookup
        Throws:
        java.io.IOException
      • getAsURLsFromClassLoader

        protected abstract java.util.Collection<java.net.URL> getAsURLsFromClassLoader​(java.lang.String filename,
                                                                                       java.lang.ClassLoader cl)
                                                                                throws java.io.IOException
        Throws:
        java.io.IOException