Class ClassPathResourceCache

java.lang.Object
net.targetr.wtm3.cache.ResourceCache
net.targetr.wtm3.cache.ClassPathResourceCache

public class ClassPathResourceCache extends ResourceCache
A ResourceCache that reads resources from the classpath.
  • Method Details

    • get

      public static ClassPathResourceCache get()
      Get the singleton instance of the ResourceCache.
      Returns:
      the singleton instance of the ResourceCache
    • openInputStream

      protected InputStream openInputStream(String path) throws IOException
      Description copied from class: ResourceCache
      Opens an input stream to the resource.
      Specified by:
      openInputStream in class ResourceCache
      Parameters:
      path - the path to the resource in the class path.
      Returns:
      an input stream to the resource, or null if not found.
      Throws:
      IOException - if an I/O error occurs.