Class PushImageCache


  • public class PushImageCache
    extends java.lang.Object
    Static helper to manage cache for push downloaded images
    • Constructor Summary

      Constructors 
      Constructor Description
      PushImageCache()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.String buildIdentifierForURL​(java.lang.String url)
      Build a file identifier out of the url of the file (simple md5)
      static android.graphics.Bitmap getImageFromCache​(android.content.Context context, java.lang.String identifier)
      Get image from cache if available.
      static void storeImageInCache​(android.content.Context context, java.lang.String identifier, android.graphics.Bitmap image)
      Store the given image into cache.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • PushImageCache

        public PushImageCache()
    • Method Detail

      • storeImageInCache

        public static void storeImageInCache​(android.content.Context context,
                                             java.lang.String identifier,
                                             android.graphics.Bitmap image)
        Store the given image into cache. Identifier should be made using buildIdentifierForURL(String) if it comes from an URL
        Parameters:
        context -
        identifier -
        image -
      • getImageFromCache

        public static android.graphics.Bitmap getImageFromCache​(android.content.Context context,
                                                                java.lang.String identifier)
        Get image from cache if available. Identifier should be made using buildIdentifierForURL(String) if it comes from an URL
        Parameters:
        context -
        identifier -
        Returns:
        bitmap if found in cache, null otherwise
      • buildIdentifierForURL

        public static java.lang.String buildIdentifierForURL​(java.lang.String url)
        Build a file identifier out of the url of the file (simple md5)
        Parameters:
        url -
        Returns: