Class CacheUtils


  • public final class CacheUtils
    extends java.lang.Object
    Utility methods for working with cache.
    • Method Detail

      • downloadPicture

        public static void downloadPicture​(StreetsideImage img)
        Downloads the the thumbnail and the full resolution picture of the given image. Does nothing if it is already in cache.
        Parameters:
        img - The image whose picture is going to be downloaded.
      • downloadCubemap

        public static void downloadCubemap​(StreetsideImage cm)
        Downloads the the thumbnail and the full resolution picture of the given image. Does nothing if it is already in cache.
        Parameters:
        cm - The image whose picture is going to be downloaded.
      • downloadPicture

        public static void downloadPicture​(StreetsideImage img,
                                           CacheUtils.PICTURE pic)
        Downloads the picture of the given image. Does nothing when it is already in cache.
        Parameters:
        img - The image to be downloaded.
        pic - The picture type to be downloaded (full quality, thumbnail or both.)
      • submit

        public static void submit​(java.lang.String key,
                                  StreetsideCache.Type type,
                                  ICachedLoaderListener lis)
        Requests the picture with the given key and quality and uses the given listener.
        Parameters:
        key - The key of the picture to be requested.
        type - The quality of the picture to be requested.
        lis - The listener that is going to receive the picture.