Module org.jpo
Package org.jpo.cache

Class ImageBytes

java.lang.Object
org.jpo.cache.ImageBytes
All Implemented Interfaces:
Serializable

public class ImageBytes extends Object implements Serializable
Serializable array of bytes representing an Image
See Also:
  • Constructor Details

    • ImageBytes

      public ImageBytes(byte[] bytes)
      Constructs a new ImageBytes object with the key and the bytes as read from disk
      Parameters:
      bytes - the bytes
  • Method Details

    • isRetrievedFromCache

      public boolean isRetrievedFromCache()
      Can be queried to see if the image came from the cache or was loaded from disk
      Returns:
      true if retrieved from cache
    • setRetrievedFromCache

      public void setRetrievedFromCache(boolean retrievedFromCache)
      Sets the retrievedFromCache flag.
      Parameters:
      retrievedFromCache - the new value for the flag
    • getByteArrayInputStream

      public ByteArrayInputStream getByteArrayInputStream()
      Returns the image bytes from the stored bytes
      Returns:
      the bytes as a ByteArrayInputStream
    • getBytes

      public byte[] getBytes()
      Returns the image bytes from the stored bytes array
      Returns:
      the bytes[]
    • setLastModification

      public void setLastModification(FileTime lastModification)
      Remembers the last modification time of the source file
      Parameters:
      lastModification - the last modification time
    • getLastModification

      public FileTime getLastModification()
      Returns the last modification time of the data that was stored in the byte array
      Returns:
      the last modification time