Package 

Class DiskLruCache.Editor

    • Method Summary

      Modifier and Type Method Description
      Source newSource(int index) Returns an unbuffered input stream to read the last committed value, or null if no value hasbeen committed.
      Sink newSink(int index) Returns a new unbuffered output stream to write the value at {@code index}.
      void commit() Commits this edit so it is visible to readers.
      void abort() Aborts this edit.
      void abortUnlessCommitted()
      • Methods inherited from class java.lang.Object

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

      • newSource

         Source newSource(int index)

        Returns an unbuffered input stream to read the last committed value, or null if no value hasbeen committed.

      • newSink

         Sink newSink(int index)

        Returns a new unbuffered output stream to write the value at {@code index}. If the underlyingoutput stream encounters errors when writing to the filesystem, this edit will be abortedwhen commit is called. The returned output stream does not throw IOExceptions.

      • commit

         void commit()

        Commits this edit so it is visible to readers. This releases the edit lock so another editmay be started on the same key.

      • abort

         void abort()

        Aborts this edit. This releases the edit lock so another edit may be started on the samekey.