Class FileCache


  • public final class FileCache
    extends java.lang.Object
    • Constructor Detail

      • FileCache

        public FileCache​(java.io.File cacheDir,
                         int buffer_size,
                         boolean read_only)
                  throws java.io.IOException
        Throws:
        java.io.IOException
      • FileCache

        public FileCache​(java.io.File cacheDir,
                         int buffer_size,
                         boolean read_only,
                         URLFetcher... fetchers)
                  throws java.io.IOException
        Throws:
        java.io.IOException
      • FileCache

        public FileCache​(java.io.File cacheDir,
                         int buffer_size,
                         boolean read_only,
                         java.util.List<URLFetcher> fetchers)
                  throws java.io.IOException
        Throws:
        java.io.IOException
    • Method Detail

      • ensureCached

        public void ensureCached​(FileCacheKey key,
                                 boolean force_reacquire)
                          throws java.io.IOException
        Throws:
        java.io.IOException
      • fetch

        public java.io.InputStream fetch​(FileCacheKey key,
                                         boolean force_reacquire)
                                  throws java.io.IOException
        Throws:
        java.io.IOException
      • isCached

        public boolean isCached​(FileCacheKey key)
                         throws java.io.IOException
        Throws:
        java.io.IOException
      • countCached

        public int countCached()
                        throws java.io.IOException
        Throws:
        java.io.IOException
      • countCached

        public int countCached​(java.io.FileFilter filter)
                        throws java.io.IOException
        Throws:
        java.io.IOException
      • fileForKey

        public java.io.File fileForKey​(FileCacheKey key)