Class ClassPathResourceCache

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

public class ClassPathResourceCache extends Object
Provides cached access to classpath resources through a ResourceCache.
Author:
Dr Michael Gardiner
  • Constructor Details

    • ClassPathResourceCache

      public ClassPathResourceCache(ResourceCache cache)
      Constructs a ClassPathResourceCache backed by the supplied common cache.
      Parameters:
      cache - the cache used to store and retrieve classpath resource data
  • Method Details

    • getBytes

      public byte[] getBytes(String path) throws IOException
      Gets the byte array content of a classpath resource through the cache.
      Parameters:
      path - the path to the resource
      Returns:
      the byte array content
      Throws:
      IOException - if the resource was not found or an I/O error occurred