Class ResourceUtil


  • public class ResourceUtil
    extends Object
    • Constructor Detail

      • ResourceUtil

        public ResourceUtil()
    • Method Detail

      • getResourceAsStream

        public static InputStream getResourceAsStream​(String resourcePath)
        We must get the Resource as a stream from the ContextClassLoader and not from the normal classLoader acquired by using getClass.getClassLoader, since we must be able to load resources from different threads e.g. running in ant.
        Parameters:
        resourcePath - path to the resource
        Returns:
        resource as InputStream