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

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

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

origin: nostra13/Android-Universal-Image-Loader

private void readJournal() throws IOException {
  StrictLineReader reader = new StrictLineReader(new FileInputStream(journalFile), Util.US_ASCII);
  try {
    String magic = reader.readLine();
    String version = reader.readLine();
    String appVersionString = reader.readLine();
    String valueCountString = reader.readLine();
    String blank = reader.readLine();
    if (!MAGIC.equals(magic)
        || !VERSION_1.equals(version)
        || !Integer.toString(appVersion).equals(appVersionString)
        || !Integer.toString(valueCount).equals(valueCountString)
        || !"".equals(blank)) {
      throw new IOException("unexpected journal header: [" + magic + ", " + version + ", "
          + valueCountString + ", " + blank + "]");
    }
    int lineCount = 0;
    while (true) {
      try {
        readJournalLine(reader.readLine());
        lineCount++;
      } catch (EOFException endOfJournal) {
        break;
      }
    }
    redundantOpCount = lineCount - lruEntries.size();
  } finally {
    Util.closeQuietly(reader);
  }
}
origin: com.nostra13.universalimageloader/universal-image-loader

private void readJournal() throws IOException {
  StrictLineReader reader = new StrictLineReader(new FileInputStream(journalFile), Util.US_ASCII);
  try {
    String magic = reader.readLine();
    String version = reader.readLine();
    String appVersionString = reader.readLine();
    String valueCountString = reader.readLine();
    String blank = reader.readLine();
    if (!MAGIC.equals(magic)
        || !VERSION_1.equals(version)
        || !Integer.toString(appVersion).equals(appVersionString)
        || !Integer.toString(valueCount).equals(valueCountString)
        || !"".equals(blank)) {
      throw new IOException("unexpected journal header: [" + magic + ", " + version + ", "
          + valueCountString + ", " + blank + "]");
    }
    int lineCount = 0;
    while (true) {
      try {
        readJournalLine(reader.readLine());
        lineCount++;
      } catch (EOFException endOfJournal) {
        break;
      }
    }
    redundantOpCount = lineCount - lruEntries.size();
  } finally {
    Util.closeQuietly(reader);
  }
}
origin: wanliyang1990/WliveTV

private void readJournal() throws IOException {
  StrictLineReader reader = new StrictLineReader(new FileInputStream(journalFile), Util.US_ASCII);
  try {
    String magic = reader.readLine();
    String version = reader.readLine();
    String appVersionString = reader.readLine();
    String valueCountString = reader.readLine();
    String blank = reader.readLine();
    if (!MAGIC.equals(magic)
        || !VERSION_1.equals(version)
        || !Integer.toString(appVersion).equals(appVersionString)
        || !Integer.toString(valueCount).equals(valueCountString)
        || !"".equals(blank)) {
      throw new IOException("unexpected journal header: [" + magic + ", " + version + ", "
          + valueCountString + ", " + blank + "]");
    }
    int lineCount = 0;
    while (true) {
      try {
        readJournalLine(reader.readLine());
        lineCount++;
      } catch (EOFException endOfJournal) {
        break;
      }
    }
    redundantOpCount = lineCount - lruEntries.size();
  } finally {
    Util.closeQuietly(reader);
  }
}
origin: jiangqqlmj/Android-Universal-Image-Loader-Modify

private void readJournal() throws IOException {
  StrictLineReader reader = new StrictLineReader(new FileInputStream(journalFile), Util.US_ASCII);
  try {
    String magic = reader.readLine();
    String version = reader.readLine();
    String appVersionString = reader.readLine();
    String valueCountString = reader.readLine();
    String blank = reader.readLine();
    if (!MAGIC.equals(magic)
        || !VERSION_1.equals(version)
        || !Integer.toString(appVersion).equals(appVersionString)
        || !Integer.toString(valueCount).equals(valueCountString)
        || !"".equals(blank)) {
      throw new IOException("unexpected journal header: [" + magic + ", " + version + ", "
          + valueCountString + ", " + blank + "]");
    }
    int lineCount = 0;
    while (true) {
      try {
        readJournalLine(reader.readLine());
        lineCount++;
      } catch (EOFException endOfJournal) {
        break;
      }
    }
    redundantOpCount = lineCount - lruEntries.size();
  } finally {
    Util.closeQuietly(reader);
  }
}
com.nostra13.universalimageloader.cache.disc.impl.extDiskLruCachereadJournalLine

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
  • deleteIfExists
  • 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.
  • journalRebuildRequired,
  • open,
  • processJournal,
  • readJournal,
  • rebuildJournal,
  • remove,
  • renameTo,
  • trimToFileCount,
  • trimToSize

Popular in Java

  • Reactive rest calls using spring rest template
  • 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
  • From CI to AI: The AI layer in your organization
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