Class DiskLruCache.Snapshot

    • Method Detail

      • edit

        public DiskLruCache.Editor edit()
                                 throws IOException
        Returns an editor for this snapshot's entry, or null if either the entry has changed since this snapshot was created or if another edit is in progress.
        Throws:
        IOException
      • getSource

        public Source getSource​(int index)
        Returns the unbuffered stream with the value for index.
      • getLength

        public long getLength​(int index)
        Returns the byte length of the value for index.
      • close

        public void close()
        Description copied from interface: Closeable
        Closes the object and release any system resources it holds.

        Although only the first call has any effect, it is safe to call close multiple times on the same object. This is more lenient than the overridden AutoCloseable.close(), which may be called at most once.

        Specified by:
        close in interface AutoCloseable
        Specified by:
        close in interface Closeable