Class URLResourceLoader

    • Field Detail

      • templateRoots

        protected java.util.Map<java.lang.String,​java.lang.String> templateRoots
    • Constructor Detail

      • URLResourceLoader

        public URLResourceLoader()
    • Method Detail

      • getResourceReader

        public java.io.Reader getResourceReader​(java.lang.String name,
                                                java.lang.String encoding)
                                         throws ResourceNotFoundException
        Get a Reader so that the Runtime can build a template with it.
        Specified by:
        getResourceReader in class ResourceLoader
        Parameters:
        name - name of template to fetch bytestream of
        encoding - asked encoding
        Returns:
        InputStream containing the template
        Throws:
        ResourceNotFoundException - if template not found in the file template path.
        Since:
        2.0
      • isSourceModified

        public boolean isSourceModified​(Resource resource)
        Checks to see if a resource has been deleted, moved or modified.
        Specified by:
        isSourceModified in class ResourceLoader
        Parameters:
        resource - Resource The resource to check for modification
        Returns:
        boolean True if the resource has been modified, moved, or unreachable
      • getLastModified

        public long getLastModified​(Resource resource)
        Checks to see when a resource was last modified
        Specified by:
        getLastModified in class ResourceLoader
        Parameters:
        resource - Resource the resource to check
        Returns:
        long The time when the resource was last modified or 0 if the file can't be reached
      • getTimeout

        public int getTimeout()
        Returns the current, custom timeout setting. If negative, there is no custom timeout.
        Returns:
        timeout
        Since:
        1.6