Package 

Class FileCache

  • All Implemented Interfaces:
    com.danikula.videocache.Cache

    
    public class FileCache
     implements Cache
                        

    Cache that uses file for storing data.

    • Field Summary

      Fields 
      Modifier and Type Field Description
      public File file
    • Method Summary

      Modifier and Type Method Description
      File getFile() Returns file to be used fo caching.
      synchronized long available()
      synchronized int read(Array<byte> buffer, long offset, int length)
      synchronized void append(Array<byte> data, int length)
      synchronized void close()
      synchronized void complete()
      synchronized boolean isCompleted()
      • Methods inherited from class java.lang.Object

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

      • FileCache

        FileCache(File file)
    • Method Detail

      • getFile

         File getFile()

        Returns file to be used fo caching. It may as original file passed in constructor as some temp file for not completed cache.

      • read

         synchronized int read(Array<byte> buffer, long offset, int length)
      • append

         synchronized void append(Array<byte> data, int length)
      • close

         synchronized void close()