Class CacheableBlob

java.lang.Object
org.deltava.util.cache.CacheableBlob
All Implemented Interfaces:
Serializable, Cacheable

public class CacheableBlob extends Object implements Cacheable
A class to make raw data cacheable.
Since:
6.0
Version:
6.0
Author:
Luke
See Also:
  • Constructor Details

    • CacheableBlob

      public CacheableBlob(Object key, byte[] data)
      Creates the object.
      Parameters:
      key - the cache key
      data - the data
  • Method Details

    • getData

      public byte[] getData()
      Returns the data.
      Returns:
      the data
    • getStream

      public InputStream getStream()
      Returns a stream to the data.
      Returns:
      the data
    • cacheKey

      public Object cacheKey()
      Description copied from interface: Cacheable
      Returns the cache key for this object. Caches call this method when adding the object.
      Specified by:
      cacheKey in interface Cacheable
      Returns:
      the cache key for the object