Class ZipFileResourceCache

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

public class ZipFileResourceCache extends ResourceCache
A ResourceCache that loads resources from a zip file.
  • Constructor Details

    • ZipFileResourceCache

      public ZipFileResourceCache(File zipFile)
      Constructs a ZipFileResourceCache.
      Parameters:
      zipFile - the zip file to read resources from
  • Method Details

    • 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.