Class CachedFile

java.lang.Object
net.adoptopenjdk.icedteaweb.resources.cache.CachedFile
All Implemented Interfaces:
ResourceInfo

class CachedFile extends Object implements ResourceInfo
Describes an entry in the cache.
Version:
$Revision: 1.10 $
  • Field Details

  • Constructor Details

  • Method Details

    • getCacheKey

      public CacheKey getCacheKey()
      Specified by:
      getCacheKey in interface ResourceInfo
      Returns:
      the cache key of the resource
    • getDownloadedAt

      public long getDownloadedAt()
      Returns the time in the local system clock that the file was most recently checked for an update.
      Specified by:
      getDownloadedAt in interface ResourceInfo
      Returns:
      when the item was updated (in ms)
    • getSize

      public long getSize()
      Specified by:
      getSize in interface ResourceInfo
      Returns:
      the size of the resource in bytes
    • getLastModified

      public long getLastModified()
      Specified by:
      getLastModified in interface ResourceInfo
      Returns:
      the last time this resource was modified (in Java millis)
    • getJnlpPath

      String getJnlpPath()
    • getCacheFile

      File getCacheFile()
    • getLongKey

      private long getLongKey(String key)
    • setLongKey

      private void setLongKey(String key, long value)
    • isFile

      boolean isFile()
    • isCurrent

      boolean isCurrent(long lastModified)
      Returns whether there is a version of the URL contents in the cache and it is up to date.
      Parameters:
      lastModified - - current time as get from server (in ms). Mostly value of "Last-Modified" http header'?
      Returns:
      whether the cache contains the version
    • isCached

      boolean isCached()
      Returns true if the cache has a local copy of the resource.
      Returns:
      true if the resource is in the cache
    • storeInfo

      void storeInfo(long downloadedAt, long lastModified, long size)
    • toString

      public String toString()
      Overrides:
      toString in class Object