Class CacheHelper


  • public abstract class CacheHelper
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Constructor Description
      CacheHelper()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static boolean deleteAll​(android.content.Context context)
      Delete cached display receipt
      static java.util.List<java.io.File> getCachedFiles​(android.content.Context context, boolean debug)
      Return a sorted list of File matching available cached display receipt.
      static byte[] read​(java.io.File inputFile)  
      static java.io.File write​(android.content.Context context, long timestamp, byte[] data)  
      static boolean write​(java.io.File outputFile, byte[] data)  
      • Methods inherited from class java.lang.Object

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

      • CacheHelper

        public CacheHelper()
    • Method Detail

      • read

        @Nullable
        public static byte[] read​(@NonNull
                                  java.io.File inputFile)
      • write

        public static java.io.File write​(@NonNull
                                         android.content.Context context,
                                         long timestamp,
                                         byte[] data)
      • write

        public static boolean write​(java.io.File outputFile,
                                    byte[] data)
      • deleteAll

        public static boolean deleteAll​(@NonNull
                                        android.content.Context context)
        Delete cached display receipt
        Parameters:
        context -
        Returns:
      • getCachedFiles

        @Nullable
        public static java.util.List<java.io.File> getCachedFiles​(@NonNull
                                                                  android.content.Context context,
                                                                  boolean debug)
        Return a sorted list of File matching available cached display receipt. Don't load the cached file in memory, only list them.
        Parameters:
        context -
        debug - If true return all cached files in any order
        Returns: