Class ResourceLoader


  • public class ResourceLoader
    extends Object
    • Constructor Detail

      • ResourceLoader

        public ResourceLoader()
    • Method Detail

      • getResource

        public static URL getResource​(String name)
        Load a resource via the thread context classloader. If security permissions don't allow this fallback to loading via current classloader.
        Parameters:
        name - a resource name
        Returns:
        a URL or null if resource is not found
      • getResourceAsStream

        public static InputStream getResourceAsStream​(String name)
        Load a resource via the thread context classloader. If security permissions don't allow this fallback to loading via current classloader.
        Parameters:
        name - a resource name
        Returns:
        an InputStream or null if resource is not found