Class ClasspathResourceLoader

  • All Implemented Interfaces:
    ResourceLoader

    public class ClasspathResourceLoader
    extends java.lang.Object
    implements ResourceLoader
    Creates an InputStream from a string that is prefixed with 'classpath:'. See Class.getResourceAsStream(String).
    Author:
    Middleware Services
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.io.InputStream load​(java.lang.String path)
      Reads an input stream from a path.
      boolean supports​(java.lang.String path)
      Returns whether the supplied path can be loaded by this resource loader.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ClasspathResourceLoader

        public ClasspathResourceLoader()
    • Method Detail

      • supports

        public boolean supports​(java.lang.String path)
        Description copied from interface: ResourceLoader
        Returns whether the supplied path can be loaded by this resource loader.
        Specified by:
        supports in interface ResourceLoader
        Parameters:
        path - to check
        Returns:
        whether the supplied path can be loaded by this resource loader
      • load

        public java.io.InputStream load​(java.lang.String path)
        Description copied from interface: ResourceLoader
        Reads an input stream from a path.
        Specified by:
        load in interface ResourceLoader
        Parameters:
        path - from which to read resource.
        Returns:
        input stream.