Package 

Class DiskLruCache.Editor

    • Method Summary

      Modifier and Type Method Description
      InputStream newInputStream(int index) Returns an unbuffered input stream to read the last committed value,or null if no value has been committed.
      String getString(int index) Returns the last committed value as a string, or null if no value hasbeen committed.
      OutputStream newOutputStream(int index) Returns a new unbuffered output stream to write the value at {@code index}.
      void set(int index, String value) Sets the value at {@code index} to {@code value}.
      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

      • newInputStream

         InputStream newInputStream(int index)

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

      • getString

         String getString(int index)

        Returns the last committed value as a string, or null if no value hasbeen committed.

      • newOutputStream

         OutputStream newOutputStream(int index)

        Returns a new unbuffered output stream to write the value at {@code index}. If the underlying output stream encounters errors whenwriting to the filesystem, this edit will be aborted when commit is called. The returned output stream does not throwIOExceptions.

      • set

         void set(int index, String value)

        Sets the value at {@code index} to {@code value}.

      • commit

         void commit()

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

      • abort

         void abort()

        Aborts this edit. This releases the edit lock so another edit may bestarted on the same key.