Module gomint.api

Class FileResourceLoader

    • Constructor Detail

      • FileResourceLoader

        public FileResourceLoader​(ClassLoader classLoader)
        Load a new FileResource. Every Loader which want to read from either the JAR or the Filesystem should extend this Class. It first checks if the File can be found on the Disk and then if not it gets read from the Jar
        classLoader - The classLoader from and for which this Resource should be loaded
    • Method Detail

      • getFileInputStreamReader

        protected InputStreamReader getFileInputStreamReader​(String path)
                                                      throws ResourceLoadFailedException
        Gets the Resource at the given relative path. It first searches the Plugins Datafolder and then it checks the JAR for an entry in it.
        path - The path which should be loaded
        An InputStreamReader for the Resource (either from out of the JAR or from disk)
        ResourceLoadFailedException - if the Encoding is wrong or the File was not found
      • cleanup

        protected void cleanup()
        Remove the Reference on the Plugin