Class CacheFileAdapter

    • Constructor Detail

      • CacheFileAdapter

        public CacheFileAdapter​(long cacheTimeMillis)
        Creates a CacheFileAdapter where files will expire after set milliseconds.
        Parameters:
        cacheTimeMillis - how long a file should exist for
        Since:
        4.0.0
      • CacheFileAdapter

        public CacheFileAdapter​(long cacheTime,
                                TimeUnit timeUnit)
        Creates a CacheFileAdapter where files will expire after a set time.
        Parameters:
        cacheTime - how long a file should exist for
        timeUnit - the time unit
        Since:
        4.0.0
        See Also:
        TimeUnit
    • Method Detail

      • getName

        public default String getName​(File file)
        Returns the name when given a file.
        Parameters:
        file - file to name
        Returns:
        new name
        Since:
        01.00.00
      • getBytes

        public default byte[] getBytes​(File file,
                                       byte[] bytes)
        Returns the bytes when given a file and its initial contents
        Parameters:
        file - file to name
        bytes - bytes from preload
        Returns:
        new bytes
        Since:
        01.00.00