Class ResourceLoader


  • public class ResourceLoader
    extends java.lang.Object
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static int TIMEOUT  
    • Constructor Summary

      Constructors 
      Constructor Description
      ResourceLoader()
      Constructor for ResourceLoader.
      ResourceLoader​(java.lang.ClassLoader cl)
      Constructor for ResourceLoader.
    • Field Detail

      • TIMEOUT

        public static final int TIMEOUT
    • Constructor Detail

      • ResourceLoader

        public ResourceLoader()
        Constructor for ResourceLoader.
      • ResourceLoader

        public ResourceLoader​(java.lang.ClassLoader cl)
        Constructor for ResourceLoader.
    • Method Detail

      • loadResourceAsStream

        public java.io.InputStream loadResourceAsStream​(java.lang.String name)
                                                 throws RuleSetNotFoundException
        Attempts to load the resource from file, a URL or the claspath

        Caller is responsible for closing the InputStream.

        Parameters:
        name - The resource to attempt and load
        Returns:
        InputStream
        Throws:
        RuleSetNotFoundException
      • loadClassPathResourceAsStream

        public java.io.InputStream loadClassPathResourceAsStream​(java.lang.String name)
                                                          throws java.io.IOException
        Throws:
        java.io.IOException