Tabnine Logo
DiskLruCache.deleteIfExists
Code IndexAdd Tabnine to your IDE (free)

How to use
deleteIfExists
method
in
com.nostra13.universalimageloader.cache.disc.impl.ext.DiskLruCache

Best Java code snippets using com.nostra13.universalimageloader.cache.disc.impl.ext.DiskLruCache.deleteIfExists (Showing top 12 results out of 315)

origin: nostra13/Android-Universal-Image-Loader

private static void renameTo(File from, File to, boolean deleteDestination) throws IOException {
  if (deleteDestination) {
    deleteIfExists(to);
  }
  if (!from.renameTo(to)) {
    throw new IOException();
  }
}
origin: nostra13/Android-Universal-Image-Loader

/**
 * Computes the initial size and collects garbage as a part of opening the
 * cache. Dirty entries are assumed to be inconsistent and will be deleted.
 */
private void processJournal() throws IOException {
  deleteIfExists(journalFileTmp);
  for (Iterator<Entry> i = lruEntries.values().iterator(); i.hasNext(); ) {
    Entry entry = i.next();
    if (entry.currentEditor == null) {
      for (int t = 0; t < valueCount; t++) {
        size += entry.lengths[t];
        fileCount++;
      }
    } else {
      entry.currentEditor = null;
      for (int t = 0; t < valueCount; t++) {
        deleteIfExists(entry.getCleanFile(t));
        deleteIfExists(entry.getDirtyFile(t));
      }
      i.remove();
    }
  }
}
origin: nostra13/Android-Universal-Image-Loader

deleteIfExists(dirty);
origin: com.nostra13.universalimageloader/universal-image-loader

private static void renameTo(File from, File to, boolean deleteDestination) throws IOException {
  if (deleteDestination) {
    deleteIfExists(to);
  }
  if (!from.renameTo(to)) {
    throw new IOException();
  }
}
origin: jiangqqlmj/Android-Universal-Image-Loader-Modify

private static void renameTo(File from, File to, boolean deleteDestination) throws IOException {
  if (deleteDestination) {
    deleteIfExists(to);
  }
  if (!from.renameTo(to)) {
    throw new IOException();
  }
}
origin: wanliyang1990/WliveTV

private static void renameTo(File from, File to, boolean deleteDestination) throws IOException {
  if (deleteDestination) {
    deleteIfExists(to);
  }
  if (!from.renameTo(to)) {
    throw new IOException();
  }
}
origin: com.nostra13.universalimageloader/universal-image-loader

/**
 * Computes the initial size and collects garbage as a part of opening the
 * cache. Dirty entries are assumed to be inconsistent and will be deleted.
 */
private void processJournal() throws IOException {
  deleteIfExists(journalFileTmp);
  for (Iterator<Entry> i = lruEntries.values().iterator(); i.hasNext(); ) {
    Entry entry = i.next();
    if (entry.currentEditor == null) {
      for (int t = 0; t < valueCount; t++) {
        size += entry.lengths[t];
        fileCount++;
      }
    } else {
      entry.currentEditor = null;
      for (int t = 0; t < valueCount; t++) {
        deleteIfExists(entry.getCleanFile(t));
        deleteIfExists(entry.getDirtyFile(t));
      }
      i.remove();
    }
  }
}
origin: wanliyang1990/WliveTV

/**
 * Computes the initial size and collects garbage as a part of opening the
 * cache. Dirty entries are assumed to be inconsistent and will be deleted.
 */
private void processJournal() throws IOException {
  deleteIfExists(journalFileTmp);
  for (Iterator<Entry> i = lruEntries.values().iterator(); i.hasNext(); ) {
    Entry entry = i.next();
    if (entry.currentEditor == null) {
      for (int t = 0; t < valueCount; t++) {
        size += entry.lengths[t];
        fileCount++;
      }
    } else {
      entry.currentEditor = null;
      for (int t = 0; t < valueCount; t++) {
        deleteIfExists(entry.getCleanFile(t));
        deleteIfExists(entry.getDirtyFile(t));
      }
      i.remove();
    }
  }
}
origin: jiangqqlmj/Android-Universal-Image-Loader-Modify

/**
 * Computes the initial size and collects garbage as a part of opening the
 * cache. Dirty entries are assumed to be inconsistent and will be deleted.
 */
private void processJournal() throws IOException {
  deleteIfExists(journalFileTmp);
  for (Iterator<Entry> i = lruEntries.values().iterator(); i.hasNext(); ) {
    Entry entry = i.next();
    if (entry.currentEditor == null) {
      for (int t = 0; t < valueCount; t++) {
        size += entry.lengths[t];
        fileCount++;
      }
    } else {
      entry.currentEditor = null;
      for (int t = 0; t < valueCount; t++) {
        deleteIfExists(entry.getCleanFile(t));
        deleteIfExists(entry.getDirtyFile(t));
      }
      i.remove();
    }
  }
}
origin: com.nostra13.universalimageloader/universal-image-loader

deleteIfExists(dirty);
origin: jiangqqlmj/Android-Universal-Image-Loader-Modify

deleteIfExists(dirty);
origin: wanliyang1990/WliveTV

deleteIfExists(dirty);
com.nostra13.universalimageloader.cache.disc.impl.extDiskLruCachedeleteIfExists

Popular methods of DiskLruCache

  • <init>
  • checkNotClosed
  • close
    Closes this cache. Stored values will remain on the filesystem.
  • delete
    Closes the cache and deletes all of its stored values. This will delete all files in the cache direc
  • edit
  • get
    Returns a snapshot of the entry named key, or null if it doesn't exist is not currently readable. If
  • getDirectory
    Returns the directory where this cache stores its data.
  • getMaxFileCount
    Returns the maximum number of files that this cache should store
  • getMaxSize
    Returns the maximum number of bytes that this cache should use to store its data.
  • journalRebuildRequired
    We only rebuild the journal when it will halve the size of the journal and eliminate at least 2000 o
  • open
    Opens the cache in directory, creating a cache if none exists there.
  • processJournal
    Computes the initial size and collects garbage as a part of opening the cache. Dirty entries are ass
  • open,
  • processJournal,
  • readJournal,
  • readJournalLine,
  • rebuildJournal,
  • remove,
  • renameTo,
  • trimToFileCount,
  • trimToSize

Popular in Java

  • Parsing JSON documents to java classes using gson
  • compareTo (BigDecimal)
  • onCreateOptionsMenu (Activity)
  • scheduleAtFixedRate (Timer)
  • URI (java.net)
    A Uniform Resource Identifier that identifies an abstract or physical resource, as specified by RFC
  • ResultSet (java.sql)
    An interface for an object which represents a database table entry, returned as the result of the qu
  • LinkedList (java.util)
    Doubly-linked list implementation of the List and Dequeinterfaces. Implements all optional list oper
  • ThreadPoolExecutor (java.util.concurrent)
    An ExecutorService that executes each submitted task using one of possibly several pooled threads, n
  • Manifest (java.util.jar)
    The Manifest class is used to obtain attribute information for a JarFile and its entries.
  • Reflections (org.reflections)
    Reflections one-stop-shop objectReflections scans your classpath, indexes the metadata, allows you t
  • Best IntelliJ plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now