Class ClassPathResourceManager

  • All Implemented Interfaces:
    ResourceManager, java.io.Closeable, java.lang.AutoCloseable

    public class ClassPathResourceManager
    extends java.lang.Object
    implements ResourceManager
    Author:
    Stuart Douglas
    • Constructor Detail

      • ClassPathResourceManager

        public ClassPathResourceManager​(java.lang.ClassLoader loader,
                                        java.lang.Package p)
      • ClassPathResourceManager

        public ClassPathResourceManager​(java.lang.ClassLoader classLoader,
                                        java.lang.String prefix)
      • ClassPathResourceManager

        public ClassPathResourceManager​(java.lang.ClassLoader classLoader)
    • Method Detail

      • getResource

        public Resource getResource​(java.lang.String path)
                             throws java.io.IOException
        Description copied from interface: ResourceManager
        Returns a resource for the given path. It is the responsibility of the called to make sure that the path in Canonicalised.
        Specified by:
        getResource in interface ResourceManager
        Parameters:
        path - The path
        Returns:
        The resource representing the path, or null if no resource was found.
        Throws:
        java.io.IOException
      • close

        public void close()
                   throws java.io.IOException
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable
        Throws:
        java.io.IOException