public FatCache(Fat fat, int cacheSize, int elementSize) { this.fat = fat; this.api = fat.getApi(); this.fatsize = fat.getBootSector().getSectorsPerFat() * fat.getBootSector().getBytesPerSector(); this.nrfats = fat.getBootSector().getNrFats(); this.elementSize = elementSize; // allocate the LinkedHashMap // that do the dirty LRU job this.map = new CacheMap(cacheSize); }