org.biojava3.core.util
Class FlatFileCache

java.lang.Object
  extended by org.biojava3.core.util.FlatFileCache

public class FlatFileCache
extends Object

Provides a cache for storing multiple small files in memory. Can be used to e.g cache gzip compressed PDB files for avoiding disk IO bottlenecks.

Author:
Andreas Prlic.

Method Summary
static void addToCache(String key, File fileToCache)
           
 void clear()
           
static void destroy()
           
static InputStream getInputStream(String key)
           
static FlatFileCache getInstance()
           
 int size()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static FlatFileCache getInstance()

addToCache

public static void addToCache(String key,
                              File fileToCache)

getInputStream

public static InputStream getInputStream(String key)

size

public int size()

clear

public void clear()

destroy

public static void destroy()