Class ResourceCache

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

public class ResourceCache extends Object
Caches resources on the classpath in memory.
Author:
Dr Michael Gardiner
  • Method Details

    • get

      public static ResourceCache get()
    • get

      public byte[] get(String path) throws IOException
      Get a resource quickly by using cache if possible.
      Parameters:
      path - the path to the resource in the class path.
      Returns:
      byte array of resource data.
      Throws:
      IOException - An exception occurred while reading the resource from class path.